Skip to content

Commit

Permalink
[CHANGE] Make Discord bot command response ephemeral
Browse files Browse the repository at this point in the history
  • Loading branch information
ppfeufer committed Oct 5, 2024
1 parent ed60239 commit 154bcfd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions timezones/aadiscordbot/cogs/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

def add_empty_field(embed: Embed) -> None:
"""
Adding an empty field to the embed
Adding an empty field to the embed.
:param embed:
:type embed:
Expand All @@ -42,7 +42,7 @@ def add_empty_field(embed: Embed) -> None:

def add_empty_line(embed: Embed) -> None:
"""
Adding an empty line to the embed
Adding an empty line to the embed.
:param embed:
:type embed:
Expand All @@ -68,7 +68,7 @@ def __init__(self, bot):
@classmethod
def show_timezones(cls) -> Embed:
"""
Create and format the embed for Discord
Create and format the embed for Discord.
:return:
:rtype:
Expand Down Expand Up @@ -151,15 +151,15 @@ def show_timezones(cls) -> Embed:
@commands.slash_command(name="time", guild_ids=[int(settings.DISCORD_GUILD_ID)])
async def time(self, ctx):
"""
Returns the Eve time and the current time in various time zones
Returns the Eve time, and the current time in various time zones.
:param ctx:
:type ctx:
:return:
:rtype:
"""

return await ctx.respond(embed=self.show_timezones())
return await ctx.respond(embed=self.show_timezones(), ephemeral=True)


def setup(bot):
Expand All @@ -168,7 +168,7 @@ def setup(bot):
:param bot:
"""

# Unload the `time` extension from `aadiscordbot`, so we can load our own
# Unload the `time` extension from `aadiscordbot`, so we can load our own.
if bot.get_cog("Time") is not None:
bot.remove_cog("Time")

Expand Down

0 comments on commit 154bcfd

Please sign in to comment.