This repository was archived by the owner on Jun 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathembeds.py
More file actions
112 lines (82 loc) · 3.26 KB
/
Copy pathembeds.py
File metadata and controls
112 lines (82 loc) · 3.26 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
from datetime import datetime
import discord
async def error_embed(message: str):
# generate embed with red colour
embed = discord.Embed(color=discord.Colour.red())
# set title field
embed.add_field(name=f"Error!", value=message)
# return finished embed
return embed
async def success_embed(message: str):
# generate embed with green colour
embed = discord.Embed(color=discord.Colour.green())
# set title field
embed.add_field(name=f"Success!", value=message)
# return finished embed
return embed
async def registration_embed(user: dict, user_id: int):
# generate embed with gold colour
embed = discord.Embed(color=discord.Colour.gold())
# set title field
embed.add_field(name=f"User Registered",
value=f"<@{user_id}> just registered.",
inline=False)
# add name fields
embed.add_field(name=f"First Name",
value=user['first_name'],
inline=True)
embed.add_field(name=f"Last Name",
value=user['last_name'],
inline=True)
embed.add_field(name=f"Email",
value=user['email'],
inline=True)
embed.timestamp = datetime.now()
embed.set_footer(text=f"ID: {user_id}",
icon_url="https://image.brandonly.me/ohsea/WhiteOnNavy.png")
# return finished embed
return embed
async def verification_embed(user_id: int, nick: str):
# generate embed with green colour
embed = discord.Embed(color=discord.Colour.green())
# set title field
embed.add_field(name=f"User Verified",
value=f"<@{user_id}> ({nick}) just verified.")
embed.timestamp = datetime.now()
embed.set_footer(text=f"ID: {user_id}",
icon_url="https://image.brandonly.me/ohsea/WhiteOnNavy.png")
# return finished embed
return embed
async def rejoin_embed(user_id: int, nick: str):
# generate embed with blue colour
embed = discord.Embed(color=discord.Colour.blue())
# set title field
embed.add_field(name=f"User Rejoined",
value=f"<@{user_id}> ({nick}) just rejoined the server.")
embed.timestamp = datetime.now()
embed.set_footer(text=f"ID: {user_id}",
icon_url="https://image.brandonly.me/ohsea/WhiteOnNavy.png")
# return finished embed
return embed
async def infoCheckEmbed(user: dict, user_id: int):
# generate embed with gold colour
embed = discord.Embed(color=discord.Colour.gold())
# set title field
embed.add_field(name=f"Is this info correct?",
value=f"Please double check your information.",
inline=False)
# add name fields
embed.add_field(name=f"First Name",
value=user['first_name'],
inline=True)
embed.add_field(name=f"Last Name",
value=user['last_name'],
inline=True)
embed.add_field(name=f"Email",
value=user['email'],
inline=True)
embed.timestamp = datetime.now()
embed.set_footer(text=f"ID: {user_id}",
icon_url="https://image.brandonly.me/ohsea/WhiteOnNavy.png")
# return finished embed
return embed