1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 22:23:13 +00:00

Change the way the prefixed is fetched in helpful embeds

This commit is contained in:
wlinator 2024-03-29 07:14:03 -04:00
parent 29d843ece4
commit 2abca5dcc2

View file

@ -1,4 +1,5 @@
import discord
from services.GuildConfig import GuildConfig
def template(text, username, level=None):
@ -26,14 +27,12 @@ def template(text, username, level=None):
def get_prefix(ctx):
"""
Attempt to get the prefix, if the command was used as a SlashCommand, return "/"
Attempt to get the prefix.
"""
try:
prefix = ctx.clean_prefix
except (discord.ApplicationCommandInvokeError, AttributeError):
prefix = "/"
return prefix
return GuildConfig.get_prefix(ctx.guild.id)
except AttributeError:
return "."
def get_invoked_name(ctx):