|
|
@ -88,7 +88,7 @@ class News(commands.Cog): |
|
|
|
checks=[commands.has_permissions(manage_guild=True)] |
|
|
|
) |
|
|
|
|
|
|
|
@news.command(description="Adds a new secret role.") |
|
|
|
@news.command(description="Sets channel for posting news.") |
|
|
|
@discord.option("channel_id", str, description="Id of the channel for sending news.") |
|
|
|
async def set_channel(self, ctx, channel_id: str): |
|
|
|
try: |
|
|
@ -104,7 +104,7 @@ class News(commands.Cog): |
|
|
|
data.dump_guild_data(ctx.guild.id, NEWS_JSON, news_json) |
|
|
|
return await ctx.respond(f"News channel set to {channel.mention}.", ephemeral=True) |
|
|
|
|
|
|
|
@news.command(description="Synchronize news feed.") |
|
|
|
@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) |
|
|
|
async def post_news(self, ctx, id: int): |
|
|
|
err = await post_news(self.bot, ctx.guild, id) |
|
|
|