async def unmute(member, mod, mute_id, reason, totype): async with aiohttp.ClientSession() as session: webhook = Webhook.from_url(startup()["log_wh"], adapter=AsyncWebhookAdapter(session)) await webhook.send(embed=Embeds.unmute(member=member, mod=mod, mute_id=mute_id, reason=reason, totype=totype))
async def member_kick(member, reason, mod): async with aiohttp.ClientSession() as session: webhook = Webhook.from_url(startup()["log_wh"], adapter=AsyncWebhookAdapter(session)) await webhook.send(embed=Embeds.kick(member, reason, mod))
async def delete(message): async with aiohttp.ClientSession() as session: webhook = Webhook.from_url(startup()["log_wh"], adapter=AsyncWebhookAdapter(session)) await webhook.send(embed=Embeds.delete(message))
async def member_unban(member): async with aiohttp.ClientSession() as session: webhook = Webhook.from_url(startup()["log_wh"], adapter=AsyncWebhookAdapter(session)) await webhook.send(embed=Embeds.unban(member))
async def edit(before, after): async with aiohttp.ClientSession() as session: webhook = Webhook.from_url(startup()["log_wh"], adapter=AsyncWebhookAdapter(session)) await webhook.send(embed=Embeds.msg_edit(before=before, after=after))
async def channel_create(channel): async with aiohttp.ClientSession() as session: webhook = Webhook.from_url(startup()["log_wh"], adapter=AsyncWebhookAdapter(session)) await webhook.send(embed=Embeds.channel_create(channel))
from config import config from Events.events import message_events from Commands import Index import discord from discord.ext import commands import subprocess import os import signal import time intents = discord.Intents.default() intents.members = True bot = commands.Bot(command_prefix=".", intents=intents) message_events(bot) Index.self_commands(bot) # subprocess.call("start Database/unmute_temps.py", shell=True) # change shell=False for no console proc = subprocess.Popen("start Database/unmute_temps.py", stdout=subprocess.PIPE, shell=True) bot.run(config.startup()["token"]) # TODO: Word Blacklist # TODO: Mongodb tempmute change