Merge pull request #7 from rzmk/moderation

Moderation
This commit is contained in:
Mueez Khan 2021-05-18 18:53:34 -04:00 committed by GitHub
commit 481b2116c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 2 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.env
env

View file

@ -1,4 +1,4 @@
# Duckster # Duckster
A fun and all-purpose bot made in Python. A fun and all-purpose bot made in Python.
Founded by @iakrules and @rzmk Founded by [@iakrules](https://github.com/iakrules) and [@rzmk](https://github.com/rzmk).

18
cogs/moderationCog.py Normal file
View file

@ -0,0 +1,18 @@
import discord
from discord.ext import commands
class ModerationCog(commands.Cog):
def __init__(self, client):
self.client = client
# Commands
@commands.command()
@commands.has_permissions(kick_members = True)
async def kick(self, ctx, member : discord.Member, *, reason="No reason provided."):
await ctx.send(member.mention + " has been kicked.")
await member.send("You have been kicked from the server because: " + reason)
await member.kick(reason=reason)
def setup(client):
client.add_cog(ModerationCog(client))

View file

@ -1 +1,9 @@
discord.py==1.7.2 aiohttp==3.7.4
async-timeout==3.0.1
attrs==21.2.0
chardet==4.0.0
discord.py==1.7.2
idna==3.1
multidict==5.1.0
typing-extensions==3.10.0.0
yarl==1.6.3