Skip to content

Commit c87faad

Browse files
+ Added utils
1 parent ca695a4 commit c87faad

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

src/utils.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import discord
2+
from discord.ext import commands
3+
from datetime import datetime
4+
5+
6+
class Embeds(discord.Embed):
7+
def __init__(self, color = None, **kwargs):
8+
super().__init__(**kwargs)
9+
self.timestamp = datetime.utcnow()
10+
self.color = color or discord.Color.from_rgb(0,191,255) #Deepskyblue
11+
12+
13+
class Error(commands.CommandError):
14+
def __init__(self, title: str = 'Error', description: str = '-', fields: dict = {}, **kwargs):
15+
self.title = title
16+
self.description = description
17+
self.fields = fields
18+
super().__init__(**kwargs)

0 commit comments

Comments
 (0)