Beispiel #1
0
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))
Beispiel #2
0
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))
Beispiel #3
0
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))
Beispiel #4
0
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))
Beispiel #5
0
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))
Beispiel #6
0
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))
Beispiel #7
0
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