mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Make messages ephemeral
This commit is contained in:
parent
739383fdb7
commit
31082bb567
1 changed files with 3 additions and 2 deletions
|
@ -38,7 +38,7 @@ class McDonaldsCog(commands.Cog):
|
||||||
@commands.user_command(name="Commercial Break")
|
@commands.user_command(name="Commercial Break")
|
||||||
@commands.cooldown(1, 30, commands.BucketType.user)
|
@commands.cooldown(1, 30, commands.BucketType.user)
|
||||||
async def commercial_break(self, ctx: discord.ApplicationContext, member: discord.Member):
|
async def commercial_break(self, ctx: discord.ApplicationContext, member: discord.Member):
|
||||||
await ctx.defer()
|
await ctx.defer(ephemeral=True)
|
||||||
if member in self.targets:
|
if member in self.targets:
|
||||||
await ctx.respond(f"{member.mention} is already in a commercial break.")
|
await ctx.respond(f"{member.mention} is already in a commercial break.")
|
||||||
return
|
return
|
||||||
|
@ -53,7 +53,8 @@ class McDonaldsCog(commands.Cog):
|
||||||
await ctx.send(
|
await ctx.send(
|
||||||
f"{member.mention} Commercial break! Please say `MCDONALDS!` to end commercial.\n"
|
f"{member.mention} Commercial break! Please say `MCDONALDS!` to end commercial.\n"
|
||||||
f"*This commercial break is sponsored by {ctx.user.mention}.*",
|
f"*This commercial break is sponsored by {ctx.user.mention}.*",
|
||||||
delete_after=300
|
delete_after=300,
|
||||||
|
allowed_mentions=discord.AllowedMentions(users=True, roles=False, everyone=False)
|
||||||
)
|
)
|
||||||
await ctx.respond("Commercial break started.", ephemeral=True)
|
await ctx.respond("Commercial break started.", ephemeral=True)
|
||||||
await ctx.delete(delay=120)
|
await ctx.delete(delay=120)
|
||||||
|
|
Loading…
Reference in a new issue