Add inventory DB cog and fix music cog
This commit is contained in:
parent
743943effd
commit
0c21b2ee01
6 changed files with 137 additions and 33 deletions
|
|
@ -9,17 +9,18 @@ class ModerationCog(commands.Cog):
|
|||
# Commands
|
||||
@commands.command()
|
||||
@commands.has_permissions(kick_members = True)
|
||||
async def kick(self, ctx, member : discord.Member, *, reason="No reason provided."):
|
||||
async def kick(self, ctx, member : commands.MemberConverter, *, reason="No reason provided."):
|
||||
"""Kick a user from the server"""
|
||||
try:
|
||||
await member.kick(reason=reason)
|
||||
await ctx.send(member.mention + " has been kicked.")
|
||||
except:
|
||||
await ctx.send(f"Unable to kick {member.mention}.\nIs {member.mention} at the same role level or higher than {self.client.user.name}?")
|
||||
|
||||
|
||||
@commands.command()
|
||||
@commands.has_permissions(ban_members = True)
|
||||
async def ban(self, ctx, member : discord.Member, *, reason="No reason provided."):
|
||||
async def ban(self, ctx, member : commands.MemberConverter, *, reason="No reason provided."):
|
||||
"""Ban a user from the server"""
|
||||
try:
|
||||
await member.ban(reason=reason)
|
||||
await ctx.send(member.mention + " has been banned.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue