1
0
mirror of https://gitlab.com/ddorn/tfjm-discord-bot.git synced 2025-12-14 20:45:15 +01:00

CustomBot with full reload

This commit is contained in:
ddorn
2020-04-30 17:26:33 +02:00
parent 3bfad6e0a9
commit 3b9f4aae95
9 changed files with 149 additions and 34 deletions

View File

@@ -1,6 +1,12 @@
import asyncio
from typing import Sequence
import psutil
from discord import Message
from discord import Message, Member, User, Reaction
from discord.ext.commands import Context, Bot
from discord.utils import get
from src.constants import Emoji
def has_role(member, role: str):
@@ -9,17 +15,9 @@ def has_role(member, role: str):
return any(r.name == role for r in member.roles)
async def send_and_bin(bot: Bot, ctx: Context, msg=None, *, embed=None):
"""Send a message and wait 5min for the author to delete it."""
message: Message = await ctx.send(msg, embed=embed)
await msg
def start_time():
def start_time(self):
return psutil.Process().create_time()
def setup(bot):
bot.send_and_bin = send_and_bin
def setup(bot: Bot):
pass