Einige Upstream-Ändderungen
This commit is contained in:
commit
dd893d220b
0
.editorconfig
Normal file → Executable file
0
.editorconfig
Normal file → Executable file
5
.gitignore
vendored
Normal file → Executable file
5
.gitignore
vendored
Normal file → Executable file
@ -1,3 +1,8 @@
|
||||
<<<<<<< HEAD
|
||||
config.lua
|
||||
=======
|
||||
otouto/plugins/mokubot*
|
||||
otouto/plugins/oubot*
|
||||
>>>>>>> upstream/master
|
||||
*.db
|
||||
tg
|
||||
|
39
config.lua
Normal file
39
config.lua
Normal file
@ -0,0 +1,39 @@
|
||||
return {
|
||||
|
||||
-- Your authorization token from the botfather.
|
||||
bot_api_key = '235106290:AAGnHNheMSMkfuXt6r_hQ2hWZkCL3gHlCmw',
|
||||
-- Your Telegram ID.
|
||||
admin = 36623702,
|
||||
-- Two-letter language code.
|
||||
lang = 'de',
|
||||
-- The channel, group, or user to send error reports to.
|
||||
-- If this is not set, errors will be printed to the console.
|
||||
log_chat = nil,
|
||||
-- The port used to communicate with tg for administration.lua.
|
||||
-- If you change this, make sure you also modify launch-tg.sh.
|
||||
cli_port = 4567,
|
||||
-- The block of text returned by /start.
|
||||
about_text = [[
|
||||
*Willkommen beim Brawlbot!*
|
||||
Sende /hilfe, um zu starten
|
||||
]],
|
||||
-- The symbol that starts a command. Usually noted as '/' in documentation.
|
||||
cmd_pat = '/',
|
||||
|
||||
-- false = only whitelisted users can use inline querys
|
||||
-- NOTE that it doesn't matter, if the chat is whitelisted! The USER must be whitelisted!
|
||||
enable_inline_for_everyone = true,
|
||||
|
||||
errors = { -- Generic error messages used in various plugins.
|
||||
generic = 'Ein unbekannter Fehler ist aufgetreten, bitte [melde diesen Bug](https://github.com/Brawl345/Brawlbot-v2/issues).',
|
||||
connection = 'Verbindungsfehler.',
|
||||
quotaexceeded = 'API-Quota aufgebraucht.',
|
||||
results = 'Keine Ergebnisse gefunden.',
|
||||
sudo = 'Du bist kein Superuser. Dieser Vorfall wird gemeldet!',
|
||||
argument = 'Invalides Argument.',
|
||||
syntax = 'Invalide Syntax.',
|
||||
chatter_connection = 'Ich möchte gerade nicht reden',
|
||||
chatter_response = 'Ich weiß nicht, was ich darauf antworten soll.'
|
||||
}
|
||||
|
||||
}
|
@ -31,21 +31,6 @@ function bot:init(config) -- The function run when the bot is started or reloade
|
||||
if not self.database then
|
||||
self.database = utilities.load_data(self.info.username..'.db')
|
||||
end
|
||||
|
||||
-- MIGRATION CODE 2.0 -> 2.1
|
||||
if self.database.users and self.database.version ~= '2.1' then
|
||||
self.database.userdata = {}
|
||||
for id, user in pairs(self.database.users) do
|
||||
self.database.userdata[id] = {}
|
||||
self.database.userdata[id].nickname = user.nickname
|
||||
self.database.userdata[id].lastfm = user.lastfm
|
||||
user.nickname = nil
|
||||
user.lastfm = nil
|
||||
user.id_str = nil
|
||||
user.name = nil
|
||||
end
|
||||
end
|
||||
-- END MIGRATION CODE
|
||||
|
||||
-- Table to cache user info (usernames, IDs, etc).
|
||||
self.database.users = self.database.users or {}
|
||||
|
@ -12,7 +12,6 @@ function help:init(config)
|
||||
end
|
||||
|
||||
function help:action(msg, config)
|
||||
|
||||
local commandlist = {}
|
||||
help_text = '*Verfügbare Befehle:*\n• '..config.cmd_pat
|
||||
|
||||
@ -20,11 +19,10 @@ function help:action(msg, config)
|
||||
if plugin.command then
|
||||
|
||||
table.insert(commandlist, plugin.command)
|
||||
--help_text = help_text .. '\n• '..config.cmd_pat .. plugin.command:gsub('%[', '\\[')
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(commandlist, 'hilfe [Plugin]')
|
||||
table.insert(commandlist, 'hilfe [Befehl]')
|
||||
table.sort(commandlist)
|
||||
help_text = help_text .. table.concat(commandlist, '\n• '..config.cmd_pat) .. '\nParameter: <benötigt> [optional]'
|
||||
|
||||
@ -52,7 +50,6 @@ function help:action(msg, config)
|
||||
end
|
||||
|
||||
utilities.send_reply(self, msg, 'Für diesen Befehl gibt es keine Hilfe.')
|
||||
|
||||
end
|
||||
|
||||
return help
|
||||
|
Reference in New Issue
Block a user