swapped ! for /
This commit is contained in:
parent
df1d6a206f
commit
af3da2abfd
@ -20,4 +20,5 @@ TIME_OFFSET is the time difference, in seconds, between your system clock. It is
|
|||||||
|
|
||||||
"people" table is for the personality plugin:
|
"people" table is for the personality plugin:
|
||||||
`"123456789": "foobar"`
|
`"123456789": "foobar"`
|
||||||
|
|
||||||
ID number must be a string.
|
ID number must be a string.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!8ball
|
/8ball
|
||||||
Magic 8-ball. Returns a standard 8ball message, unless called with "y/n", where it will return a less verbose answer.
|
Magic 8-ball. Returns a standard 8ball message, unless called with "y/n", where it will return a less verbose answer.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!helix',
|
'^/helix',
|
||||||
'^!8ball',
|
'^/8ball',
|
||||||
'y/n%p?$'
|
'y/n%p?$'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!admin '
|
'^/admin '
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!bandersnatch
|
/bandersnatch
|
||||||
This is a Benedict Cumberbatch name generator.
|
This is a Benedict Cumberbatch name generator.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!bandersnatch',
|
'^/bandersnatch',
|
||||||
'^!bc$'
|
'^/bc$'
|
||||||
}
|
}
|
||||||
|
|
||||||
PLUGIN.fullnames = { "Wimbledon Tennismatch", "Rinkydink Curdlesnoot", "Butawhiteboy Cantbekhan", "Benadryl Claritin", "Bombadil Rivendell", "Wanda's Crotchfruit", "Biblical Concubine", "Syphilis Cankersore", "Buckminster Fullerene", "Bourgeoisie Capitalist" }
|
PLUGIN.fullnames = { "Wimbledon Tennismatch", "Rinkydink Curdlesnoot", "Butawhiteboy Cantbekhan", "Benadryl Claritin", "Bombadil Rivendell", "Wanda's Crotchfruit", "Biblical Concubine", "Syphilis Cankersore", "Buckminster Fullerene", "Bourgeoisie Capitalist" }
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!bible <verse>
|
/bible <verse>
|
||||||
Returns a verse from the bible, King James Version. Use a standard or abbreviated reference (John 3:16, Jn3:16).
|
Returns a verse from the bible, King James Version. Use a standard or abbreviated reference (John 3:16, Jn3:16).
|
||||||
http://biblia.com
|
http://biblia.com
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!bible',
|
'^/bible',
|
||||||
'^!b '
|
'^/b '
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!btc <currency> [amount]
|
/btc <currency> [amount]
|
||||||
Gives bitcoin prices for the given currency, and optionally conversion of an amount to and from that currency.
|
Gives bitcoin prices for the given currency, and optionally conversion of an amount to and from that currency.
|
||||||
BitcoinAverage Price Index https://bitcoinaverage.com/
|
BitcoinAverage Price Index https://bitcoinaverage.com/
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!btc'
|
'^/btc'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!calc <expression>
|
/calc <expression>
|
||||||
This command solves math expressions and does conversion between common units. See mathjs.org/docs/expressions/syntax for a list of accepted syntax.
|
This command solves math expressions and does conversion between common units. See mathjs.org/docs/expressions/syntax for a list of accepted syntax.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!calc'
|
'^/calc'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!commit
|
/commit
|
||||||
http://whatthecommit.com.
|
http://whatthecommit.com.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!commit'
|
'^/commit'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!roll [range]
|
/roll [range]
|
||||||
Roll a die. Use any positive number for range or use D&D notation.
|
Roll a die. Use any positive number for range or use D&D notation.
|
||||||
Example: !roll 4D100 will roll a 100-sided die four times.
|
Example: !roll 4D100 will roll a 100-sided die four times.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!roll'
|
'^/roll'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!dogify <lines/separatedby/slashes>
|
/dogify <lines/separatedby/slashes>
|
||||||
Produces a doge image from dogr.io. Newlines are indicated by a forward slash. Words do not need to be spaced, but spacing is supported. Will post a previewed link rather than an image.
|
Produces a doge image from dogr.io. Newlines are indicated by a forward slash. Words do not need to be spaced, but spacing is supported. Will post a previewed link rather than an image.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!doge ',
|
'^/doge ',
|
||||||
'^!dogify '
|
'^/dogify '
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!echo <text>
|
/echo <text>
|
||||||
Repeat a string.
|
Repeat a string.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!echo'
|
'^/echo'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!fortune
|
/fortune
|
||||||
Get a random fortune from the UNIX fortune program.
|
Get a random fortune from the UNIX fortune program.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!fortune',
|
'^/fortune',
|
||||||
'^!f$'
|
'^/f$'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!images <query>
|
/images <query>
|
||||||
This command performs a Google Images search for the given query. One random top result is returned. Safe search is enabled by default; use '!insfw' to get potentially NSFW results.
|
This command performs a Google Images search for the given query. One random top result is returned. Safe search is enabled by default; use '!insfw' to get potentially NSFW results.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!images?',
|
'^/images?',
|
||||||
'^!img',
|
'^/img',
|
||||||
'^!i ',
|
'^/i ',
|
||||||
'^!insfw'
|
'^/insfw'
|
||||||
}
|
}
|
||||||
|
|
||||||
PLUGIN.exts = {
|
PLUGIN.exts = {
|
||||||
@ -24,7 +24,7 @@ function PLUGIN.action(msg)
|
|||||||
|
|
||||||
local url = 'http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=8'
|
local url = 'http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=8'
|
||||||
|
|
||||||
if not string.match(msg.text, '^!insfw ') then
|
if not string.match(msg.text, '^/insfw ') then
|
||||||
url = url .. '&safe=active'
|
url = url .. '&safe=active'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!loc <location>
|
/loc <location>
|
||||||
Sends location data for query, taken from Google Maps. Works for countries, cities, landmarks, etc.
|
Sends location data for query, taken from Google Maps. Works for countries, cities, landmarks, etc.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!loc'
|
'^/loc'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!google <query>
|
/google <query>
|
||||||
This command performs a Google search for the given query. Four results are returned. Safe search is enabled by default; use '!gnsfw' to get potentially NSFW results. Four results are returned for a group chat, or eight in a private message.
|
This command performs a Google search for the given query. Four results are returned. Safe search is enabled by default; use '!gnsfw' to get potentially NSFW results. Four results are returned for a group chat, or eight in a private message.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!g ',
|
'^/g ',
|
||||||
'^!google',
|
'^/google',
|
||||||
'^!gnsfw'
|
'^/gnsfw'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
|
||||||
local url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0'
|
local url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0'
|
||||||
|
|
||||||
if not string.match(msg.text, '^!gnsfw ') then
|
if not string.match(msg.text, '^/gnsfw ') then
|
||||||
url = url .. '&safe=active'
|
url = url .. '&safe=active'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!giphy [query]
|
/giphy [query]
|
||||||
Returns a random or search-resulted GIF from giphy.com. Results are limited to PG-13 by default; use '!gifnsfw' to get potentially NSFW results.
|
Returns a random or search-resulted GIF from giphy.com. Results are limited to PG-13 by default; use '!gifnsfw' to get potentially NSFW results.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!giphy',
|
'^/giphy',
|
||||||
'^!gifnsfw'
|
'^/gifnsfw'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
@ -16,7 +16,7 @@ function PLUGIN.action(msg)
|
|||||||
local random_url = 'http://tv.giphy.com/v1/gifs/random?api_key=' .. config.GIPHY_API_KEY
|
local random_url = 'http://tv.giphy.com/v1/gifs/random?api_key=' .. config.GIPHY_API_KEY
|
||||||
local result_url = ''
|
local result_url = ''
|
||||||
|
|
||||||
if string.match(msg.text, '^!giphynsfw') then
|
if string.match(msg.text, '^/giphynsfw') then
|
||||||
search_url = search_url .. '&rating=r&q='
|
search_url = search_url .. '&rating=r&q='
|
||||||
random_url = random_url .. '&rating=r'
|
random_url = random_url .. '&rating=r'
|
||||||
else
|
else
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!hackernews
|
/hackernews
|
||||||
Returns some top stories from Hacker News. Four in a group or eight in a private message.
|
Returns some top stories from Hacker News. Four in a group or eight in a private message.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!hackernews',
|
'^/hackernews',
|
||||||
'^!hn$'
|
'^/hn$'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!help [command]
|
/help [command]
|
||||||
Get list of basic information for all commands, or more detailed documentation on a specified command.
|
Get list of basic information for all commands, or more detailed documentation on a specified command.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!help',
|
'^/help',
|
||||||
'^!h$',
|
'^/h$',
|
||||||
'^/help'
|
'^/help'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!hex <number>
|
/hex <number>
|
||||||
This function converts a number to or from hexadecimal.
|
This function converts a number to or from hexadecimal.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!hex '
|
'^/hex '
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!imdb <movie | TV series>
|
/imdb <movie | TV series>
|
||||||
This function retrieves the IMDb info for a given film or television series, including the year, genre, imdb rating, runtime, and a summation of the plot.
|
This function retrieves the IMDb info for a given film or television series, including the year, genre, imdb rating, runtime, and a summation of the plot.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!imdb'
|
'^/imdb'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!dex <pokemon>
|
/dex <pokemon>
|
||||||
Get Pokedex information for a given Pokemon.
|
Get Pokedex information for a given Pokemon.
|
||||||
Includes national ID number, type, height, weight, and a description from a random regional dex.
|
Includes national ID number, type, height, weight, and a description from a random regional dex.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!dex'
|
'^/dex'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!pun
|
/pun
|
||||||
Get a random pun.
|
Get a random pun.
|
||||||
Have a recommendation? PM @topkecleon.
|
Have a recommendation? PM @topkecleon.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!pun'
|
'^/pun'
|
||||||
}
|
}
|
||||||
|
|
||||||
PLUGIN.puns = {
|
PLUGIN.puns = {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!reddit [r/subreddit | query]
|
/reddit [r/subreddit | query]
|
||||||
This command returns top results for a given query or subreddit. NSFW posts are marked as such.
|
This command returns top results for a given query or subreddit. NSFW posts are marked as such.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!reddit',
|
'^/reddit',
|
||||||
'^!r$',
|
'^/r$',
|
||||||
'^!r '
|
'^/r '
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!remind <delay> <message>
|
/remind <delay> <message>
|
||||||
Set a reminder for yourself. First argument is the number of minutes until you wish to be reminded.
|
Set a reminder for yourself. First argument is the number of minutes until you wish to be reminded.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!remind$',
|
'^/remind$',
|
||||||
'^!remind '
|
'^/remind '
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!shrug',
|
|
||||||
'/shrug'
|
'/shrug'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!slap [victim]
|
/slap [victim]
|
||||||
Slap someone!
|
Slap someone!
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!slap'
|
'^/slap'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.getSlap(slapper, victim)
|
function PLUGIN.getSlap(slapper, victim)
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!time <location>
|
/time <location>
|
||||||
Sends the time and timezone for a given location.
|
Sends the time and timezone for a given location.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!time'
|
'^/time'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!ud <term>
|
/ud <term>
|
||||||
Returns the first definition for a given term from Urban Dictionary.
|
Returns the first definition for a given term from Urban Dictionary.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!ud',
|
'^/ud',
|
||||||
'^!urbandictionary'
|
'^/urbandictionary'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!weather <location>
|
/weather <location>
|
||||||
Returns the current temperature and weather conditions for a specified location.
|
Returns the current temperature and weather conditions for a specified location.
|
||||||
Non-city locations are accepted; "!weather Buckingham Palace" will return the weather for Westminster.
|
Non-city locations are accepted; "!weather Buckingham Palace" will return the weather for Westminster.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!weather'
|
'^/weather'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!whoami
|
/whoami
|
||||||
Get the user ID for yourself and the group.
|
Get the user ID for yourself and the group.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!whoami',
|
'^/whoami',
|
||||||
'^!ping',
|
'^/ping',
|
||||||
'^/ping'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
@ -21,15 +20,15 @@ function PLUGIN.action(msg)
|
|||||||
from_name = '@' .. msg.from.username .. ', AKA ' .. from_name
|
from_name = '@' .. msg.from.username .. ', AKA ' .. from_name
|
||||||
end
|
end
|
||||||
from_name = from_name .. ' (' .. msg.from.id .. ')'
|
from_name = from_name .. ' (' .. msg.from.id .. ')'
|
||||||
|
|
||||||
if msg.from.id == msg.chat.id then
|
if msg.from.id == msg.chat.id then
|
||||||
to_name = '@' .. bot.username .. ' (' .. bot.id .. ')'
|
to_name = '@' .. bot.username .. ' (' .. bot.id .. ')'
|
||||||
else
|
else
|
||||||
to_name = string.gsub(msg.chat.title, '_', ' ') .. ' (' .. string.gsub(msg.chat.id, '-', '') .. ')'
|
to_name = string.gsub(msg.chat.title, '_', ' ') .. ' (' .. string.gsub(msg.chat.id, '-', '') .. ')'
|
||||||
end
|
end
|
||||||
|
|
||||||
local message = 'You are ' .. from_name .. ' and you are messaging ' .. to_name .. '.'
|
local message = 'You are ' .. from_name .. ' and you are messaging ' .. to_name .. '.'
|
||||||
|
|
||||||
send_msg(msg, message)
|
send_msg(msg, message)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
local PLUGIN = {}
|
local PLUGIN = {}
|
||||||
|
|
||||||
PLUGIN.doc = [[
|
PLUGIN.doc = [[
|
||||||
!xkcd [search]
|
/xkcd [search]
|
||||||
This command returns an xkcd strip, its number, and its "secret" text. You may search for a specific strip or get a random one.
|
This command returns an xkcd strip, its number, and its "secret" text. You may search for a specific strip or get a random one.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
PLUGIN.triggers = {
|
PLUGIN.triggers = {
|
||||||
'^!xkcd'
|
'^/xkcd'
|
||||||
}
|
}
|
||||||
|
|
||||||
function PLUGIN.action(msg)
|
function PLUGIN.action(msg)
|
||||||
|
Reference in New Issue
Block a user