Weitere Anpassungen
Patterns angepasst Ungenutzte Plugins entfernt Kleine Änderungen & Fixes Stabilitätsverbesserungen
This commit is contained in:
@ -9,8 +9,8 @@ local bindings = require('miku.bindings')
|
||||
mal.command = 'anime <Anime>, /manga <Manga>'
|
||||
|
||||
function mal:init(config)
|
||||
if not cred_data.mal_user then
|
||||
print('Missing config value: mal_user.')
|
||||
if not cred_data.mal_username then
|
||||
print('Missing config value: mal_username.')
|
||||
print('myanimelist.lua will not be enabled.')
|
||||
return
|
||||
elseif not cred_data.mal_pw then
|
||||
@ -21,6 +21,7 @@ function mal:init(config)
|
||||
|
||||
mal.triggers = {
|
||||
"^/(anime) (.+)$",
|
||||
"^/(mal) (.+)$",
|
||||
"^/(manga) (.+)$"
|
||||
}
|
||||
mal.doc = [[*
|
||||
@ -29,7 +30,7 @@ function mal:init(config)
|
||||
]]
|
||||
end
|
||||
|
||||
local user = cred_data.mal_user
|
||||
local user = cred_data.mal_username
|
||||
local password = cred_data.mal_pw
|
||||
|
||||
local BASE_URL = 'http://'..user..':'..password..'@myanimelist.net/api'
|
||||
@ -192,7 +193,7 @@ end
|
||||
|
||||
function mal:action(msg, config, matches)
|
||||
local query = URL.escape(matches[2])
|
||||
if matches[1] == 'anime' then
|
||||
if matches[1] == 'anime' or matches[1] == 'mal' then
|
||||
local anime_info = mal:get_mal_info(query, 'anime')
|
||||
if anime_info == "HTTP-Fehler" then
|
||||
utilities.send_reply(self, msg, 'Anime nicht gefunden!')
|
||||
|
Reference in New Issue
Block a user