whoop
This commit is contained in:
parent
43a6b53c90
commit
6fbd718af0
@ -247,7 +247,7 @@ Additionally, antiflood can be configured to automatically ban a user after he h
|
||||
| `remind.lua` | /remind <duration> <message> | Reminds a user of something after a duration of minutes. |
|
||||
| `channel.lua` | /ch <channel> \n <message> | Sends a markdown-enabled message to a channel. |
|
||||
| `isup.lua` | /isup <url> | Returns the status of a website. |
|
||||
| `starwars-crawl.lua` | /sw <title | number> | Returns the opening crawl from the specified Star Wars film. | /sw |
|
||||
| `starwars-crawl.lua` | /sw <title ¦ number> | Returns the opening crawl from the specified Star Wars film. | /sw |
|
||||
| `chuckfact.lua` | /chuck | Returns a fact about Chuck Norris. | /cn |
|
||||
| `catfact.lua` | /catfact | Returns a fact about cats. |
|
||||
|
||||
|
@ -55,14 +55,13 @@ function bot:init(config)
|
||||
-- and messages from blacklisted users also go into self.panoptic_plugins.
|
||||
self.plugins = {}
|
||||
self.panoptic_plugins = {}
|
||||
local t = {} -- Petty pseudo-optimization.
|
||||
for _, pname in ipairs(config.plugins) do
|
||||
local plugin = require('otouto.plugins.'..pname)
|
||||
table.insert(self.plugins, plugin)
|
||||
if plugin.init then plugin.init(self, config) end
|
||||
if plugin.panoptic then table.insert(self.panoptic_plugins, plugin) end
|
||||
if plugin.doc then plugin.doc = '```\n'..plugin.doc..'\n```' end
|
||||
if not plugin.triggers then plugin.triggers = t end
|
||||
if not plugin.triggers then plugin.triggers = {} end
|
||||
end
|
||||
|
||||
print('@' .. self.info.username .. ', AKA ' .. self.info.first_name ..' ('..self.info.id..')')
|
||||
|
Reference in New Issue
Block a user