ban command

This commit is contained in:
nin0 2025-05-04 19:18:08 -04:00
parent 3aa4595aa9
commit 06f60e29e5
Signed by: nin0
SSH key fingerprint: SHA256:NOoDnFVvZNFvqfXCIhzr6oCTDImZAbTTuyAysZ8Ufk8
3 changed files with 17 additions and 2 deletions

3
.gitignore vendored
View file

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

11
cogs/mod.py Normal file
View file

@ -0,0 +1,11 @@
from discord.ext import commands
import discord
from main import Vaius
class Mod(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def ban(self, ctx: commands.Context, user: discord.User):
await ctx.channel.remove_recipients(user)

View file

@ -3,14 +3,17 @@ from discord.ext import commands
from dotenv import load_dotenv
import os
from cogs.mod import Mod
load_dotenv()
class Vaius(commands.Bot):
async def on_ready(self):
print(f"Logged in as {self.user.name}")
await self.add_cog(Mod(self))
async def on_message(self, message: discord.Message):
if (message.guild and message.guild.id != 1362175947612098892) and message.channel.id != 1363685774800978074:
if message.channel.id != 1363685774800978074:
return
ctx = await self.get_context(message)
if ctx.valid: