commit
481b2116c6
4 changed files with 30 additions and 2 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.env
|
||||
env
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Duckster
|
||||
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
18
cogs/moderationCog.py
Normal 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))
|
||||
|
|
@ -1 +1,9 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue