News: Fix interaction timeouting
This commit is contained in:
parent
424078deff
commit
8fcc250041
1 changed files with 2 additions and 1 deletions
|
@ -107,10 +107,11 @@ class News(commands.Cog):
|
||||||
@news.command(description="Posts news of given id to set channel.")
|
@news.command(description="Posts news of given id to set channel.")
|
||||||
@discord.option("id", str, description="Id of entry to send.", autocomplete=autocomplete_news_ids)
|
@discord.option("id", str, description="Id of entry to send.", autocomplete=autocomplete_news_ids)
|
||||||
async def post_news(self, ctx, id: int):
|
async def post_news(self, ctx, id: int):
|
||||||
|
await ctx.defer(ephemeral=True)
|
||||||
err = await post_news(self.bot, ctx.guild, id)
|
err = await post_news(self.bot, ctx.guild, id)
|
||||||
if err:
|
if err:
|
||||||
return await ctx.respond(err, ephemeral=True)
|
return await ctx.respond(err, ephemeral=True)
|
||||||
return await ctx.respond(f"News posted.", ephemeral=True)
|
return await ctx.respond(f"News posted.")
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
|
|
Loading…
Reference in a new issue