mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 00:30:11 +00:00
Remove CommandError, return error embeds instead
This commit is contained in:
parent
99e2fad2b2
commit
2ae8fd5f34
9 changed files with 101 additions and 80 deletions
29
src/pluralkit/bot/embeds.py
Normal file
29
src/pluralkit/bot/embeds.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
from typing import Tuple
|
||||
|
||||
import discord
|
||||
|
||||
|
||||
def success(text: str):
|
||||
embed = discord.Embed()
|
||||
embed.description = text
|
||||
embed.colour = discord.Colour.green()
|
||||
return embed
|
||||
|
||||
|
||||
def error(text: str, help: Tuple[str, str] = None):
|
||||
embed = discord.Embed()
|
||||
embed.description = text
|
||||
embed.colour = discord.Colour.dark_red()
|
||||
|
||||
if help:
|
||||
help_title, help_text = help
|
||||
embed.add_field(name=help_title, value=help_text)
|
||||
|
||||
return embed
|
||||
|
||||
|
||||
def status(text: str):
|
||||
embed = discord.Embed()
|
||||
embed.description = text
|
||||
embed.colour = discord.Colour.blue()
|
||||
return embed
|
||||
Loading…
Add table
Add a link
Reference in a new issue