-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.py
64 lines (41 loc) · 1.73 KB
/
utils.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from discord.ext import commands
import random
import discord
div = ["sleepy", "red", "blue", "yellow", "young",
"little", "good", "early", "calm", "clean"]
sub = ["Cat", "Lobster", "Magician", "Hero", "President",
"Manager", "Tiger", "Eagle", "Star", "Duck"]
def random_nick():
return f"{random.choice(div)} {random.choice(sub)}"
def embed_confirm(msg, title="", status=""):
embed = discord.Embed(color=discord.Color.green(), title=title, description=msg)
embed.set_footer(text=status)
return embed
def embed_intro(participants):
welcome = "Welcome to your session. Simply write in this chat and any message besides" \
"commands will be relayed to your session partner. Be kind and keep in mind" \
"that we're no professional therapists if you got serious problems." \
"If you're unlucky and you want to report your session partner please attach" \
"some screenshots with the command invokation."
embed = discord.Embed(title=f"User: {' - '.join([u.alias for u in participants])}",
description=welcome)
footer = "Leave the session with .leave | report your session partner with .report"
embed.set_footer(text=footer)
return embed
def embed_error(msg):
return discord.Embed(color=discord.Color.red(), description=msg)
class StillBanned(commands.CheckFailure):
def __init__(self, days):
self.days = days + 1
class NotBanned(commands.CheckFailure):
pass
class AlreadyQueued(commands.CheckFailure):
pass
class NotQueued(commands.CheckFailure):
pass
class ActiveSession(commands.CheckFailure):
pass
class NoSession(commands.CheckFailure):
pass
class NoMod(commands.CheckFailure):
pass