Fixed multiple issues relating to aliases
This commit is contained in:
parent
559d6d3063
commit
69e5a31808
|
@ -33,10 +33,10 @@ return function(message,overrides)
|
|||
tts = message.tts,
|
||||
type = message.type,
|
||||
webhookId = message.webhookId,
|
||||
addReaction = function(...)
|
||||
addReaction = function(self,...)
|
||||
message:addReaction(...)
|
||||
end,
|
||||
removeReaction = function(...)
|
||||
removeReaction = function(self,...)
|
||||
message:removeReaction(...)
|
||||
end,
|
||||
emulated = true
|
||||
|
|
|
@ -56,6 +56,7 @@ local function remove_alias(name)
|
|||
if config.aliases[name] then
|
||||
config.aliases[name] = nil
|
||||
plugin:remove_command(aliases[name])
|
||||
aliases[name] = nil
|
||||
return true
|
||||
else
|
||||
return false
|
||||
|
|
|
@ -28,7 +28,9 @@ local grantrole = command("grant-role",{
|
|||
"role"
|
||||
},
|
||||
exec = function(msg,args,opts)
|
||||
return ((args[2] and msg.guild:getMember(args[2])) or msg.member):addRole(args[1])
|
||||
return ((args[2] and
|
||||
msg.guild:getMember(args[2]:match("%d+"))
|
||||
) or msg.member):addRole(args[1])
|
||||
end
|
||||
})
|
||||
plugin:add_command(grantrole)
|
||||
|
@ -50,7 +52,9 @@ local revokerole = command("revoke-role",{
|
|||
"role"
|
||||
},
|
||||
exec = function(msg,args,opts)
|
||||
return ((args[2] and msg.guild:getMember(args[2])) or msg.member):removeRole(args[1])
|
||||
return ((args[2] and
|
||||
msg.guild:getMember(args[2]:match("%d+")))
|
||||
or msg.member):removeRole(args[1])
|
||||
end
|
||||
})
|
||||
plugin:add_command(revokerole)
|
||||
|
|
Loading…
Reference in New Issue