Compare commits

...

2 Commits

  1. 50
      README.md
  2. 4
      hrochobot/cogs/news.py

50
README.md

@ -26,3 +26,53 @@ To run the bot simply execute ``main.py``:
```sh
./main.py
```
## Commands
### Basic
#### `/sayhello`
Prints ``Hello world!``
#### `/ping`
Shows the bot's latency.
### Messages
#### `/set_forward_channel <#channel>`
Sets channel to forward messages to.
#### `>forward`
Forwards message to set channel
### Roles
#### `/secretroles`
Manages roles locked behind a password.
Lock ``@role`` behind a password ``supersecret``:
```
/secretroles add @role supersecret
```
Delete password ``supersecret``, so role is no longer obtainable with it:
```
/secretroles delete supersecret
```
List all current passwords and their roles:
```
/secretroles list
```
### KSP
Ksp related commands
#### `/task`
Generates urls for given task.
#### `/deadlines`
Shows deadlines of currently running series.
### News
#### `/news set_channel <#channel>`
Set channel for posting news.
#### `/news post_news <id>`
Post news with given `id` to set channel.

4
hrochobot/cogs/news.py

@ -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)

Loading…
Cancel
Save