Nothing important.
Old local changes I never committed.
This commit is contained in:
parent
7d23fc240e
commit
b1b4a0be6c
1
bot.lua
1
bot.lua
@ -50,7 +50,6 @@ on_msg_receive = function(msg) -- The fn run whenever a message is received.
|
||||
for i,v in ipairs(plugins) do
|
||||
for k,w in pairs(v.triggers) do
|
||||
if string.match(msg.text:lower(), w) then
|
||||
|
||||
-- a few shortcuts
|
||||
msg.chat.id_str = tostring(msg.chat.id)
|
||||
msg.from.id_str = tostring(msg.from.id)
|
||||
|
@ -407,7 +407,13 @@ local commits = {
|
||||
"First Blood",
|
||||
"Fixed the fuck out of #526!",
|
||||
"I'm too old for this shit!",
|
||||
"One little whitespace gets its very own commit! Oh, life is so erratic!"
|
||||
"One little whitespace gets its very own commit! Oh, life is so erratic!",
|
||||
"please dont let this be the problem",
|
||||
"good: no crash. bad: nothing happens",
|
||||
"trying",
|
||||
"trying harder",
|
||||
"i tried",
|
||||
"fml"
|
||||
}
|
||||
|
||||
local action = function(msg)
|
||||
|
@ -27,6 +27,11 @@ local triggers = {
|
||||
|
||||
local action = function(msg)
|
||||
|
||||
do
|
||||
sendReply(msg, 'This feature is deprecated! Please use @pic or @bing instead.')
|
||||
return
|
||||
end
|
||||
|
||||
local input = msg.text:input()
|
||||
if not input then
|
||||
if msg.reply_to_message and msg.reply_to_message.text then
|
||||
|
@ -8,7 +8,7 @@ Sets your libre.fm username. Otherwise, /np will use your Telegram username. Use
|
||||
```]]
|
||||
|
||||
local triggers = {
|
||||
'^/libre[@'..bot.username..']*',
|
||||
'^/librefm[@'..bot.username..']*',
|
||||
'^/lnp[@'..bot.username..']*',
|
||||
'^/lfmset[@'..bot.username..']*'
|
||||
}
|
||||
|
@ -41,6 +41,10 @@ local action = function(msg)
|
||||
end
|
||||
|
||||
local jdat = JSON.decode(jstr)
|
||||
if jdat.cod ~= 200 then
|
||||
sendReply(msg, 'Error: City not found.')
|
||||
return
|
||||
end
|
||||
|
||||
local celsius = string.format('%.2f', jdat.main.temp - 273.15)
|
||||
local fahrenheit = string.format('%.2f', celsius * (9/5) + 32)
|
||||
|
@ -1,9 +1,10 @@
|
||||
-- utilities.lua
|
||||
-- Functions shared among plugins.
|
||||
|
||||
HTTP = require('socket.http')
|
||||
HTTPS = require('ssl.https')
|
||||
JSON = require('dkjson')
|
||||
-- you're welcome, brayden :^)
|
||||
local HTTP = HTTP or require('socket.http')
|
||||
local HTTPS = HTTPS or require('ssl.https')
|
||||
local JSON = JSON or require('dkjson')
|
||||
|
||||
-- get the indexed word in a string
|
||||
get_word = function(s, i)
|
||||
|
Reference in New Issue
Block a user