administration 1.13.1
Added optional target for kick/ban logs. Added flag 7 to use default log per group. This way, a realm can have a public kick/ban log but governors are able to opt out. Added flag 8, antilink. Kicks for Telegram join links which do not refer to groups within the realm. Added flag 9, modrights, to give moderators access to changing the group photo, title, link, and motd (config option is deprecated. RIP). /unban will reset the target's autokick counter. Added configuration for default flag settings. Revision to bindings.lua. BASE_URL has been moved to bindings. There is no real reason for it to remain in instance. Token is passed to bindings.init at load. All plugins have been updated accordingly.
This commit is contained in:
@ -21,13 +21,13 @@ function weather:action(msg, config)
|
||||
|
||||
local input = utilities.input_from_msg(msg)
|
||||
if not input then
|
||||
utilities.send_reply(self, msg, weather.doc, true)
|
||||
utilities.send_reply(msg, weather.doc, true)
|
||||
return
|
||||
end
|
||||
|
||||
local coords = utilities.get_coords(input, config)
|
||||
if type(coords) == 'string' then
|
||||
utilities.send_reply(self, msg, coords)
|
||||
utilities.send_reply(msg, coords)
|
||||
return
|
||||
end
|
||||
|
||||
@ -35,13 +35,13 @@ function weather:action(msg, config)
|
||||
|
||||
local jstr, res = HTTP.request(url)
|
||||
if res ~= 200 then
|
||||
utilities.send_reply(self, msg, config.errors.connection)
|
||||
utilities.send_reply(msg, config.errors.connection)
|
||||
return
|
||||
end
|
||||
|
||||
local jdat = JSON.decode(jstr)
|
||||
if jdat.cod ~= 200 then
|
||||
utilities.send_reply(self, msg, 'Error: City not found.')
|
||||
utilities.send_reply(msg, 'Error: City not found.')
|
||||
return
|
||||
end
|
||||
|
||||
@ -49,7 +49,7 @@ function weather:action(msg, config)
|
||||
local fahrenheit = string.format('%.2f', celsius * (9/5) + 32)
|
||||
local output = '`' .. celsius .. '°C | ' .. fahrenheit .. '°F, ' .. jdat.weather[1].description .. '.`'
|
||||
|
||||
utilities.send_reply(self, msg, output, true)
|
||||
utilities.send_reply(msg, output, true)
|
||||
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user