Compare commits
	
		
			No commits in common. "424078deffc477d08f0b2b043ec317f1942bcb51" and "747d17d8d360a5c93dbfbb84df1c6a30fec9ea53" have entirely different histories.
		
	
	
		
			424078deff
			...
			747d17d8d3
		
	
		
					 2 changed files with 2 additions and 52 deletions
				
			
		
							
								
								
									
										50
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										50
									
								
								README.md
									
									
									
									
									
								
							| 
						 | 
					@ -26,53 +26,3 @@ To run the bot simply execute ``main.py``:
 | 
				
			||||||
```sh
 | 
					```sh
 | 
				
			||||||
./main.py
 | 
					./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.
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -88,7 +88,7 @@ class News(commands.Cog):
 | 
				
			||||||
        checks=[commands.has_permissions(manage_guild=True)]
 | 
					        checks=[commands.has_permissions(manage_guild=True)]
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @news.command(description="Sets channel for posting news.")
 | 
					    @news.command(description="Adds a new secret role.")
 | 
				
			||||||
    @discord.option("channel_id", str, description="Id of the channel for sending news.")
 | 
					    @discord.option("channel_id", str, description="Id of the channel for sending news.")
 | 
				
			||||||
    async def set_channel(self, ctx, channel_id: str):
 | 
					    async def set_channel(self, ctx, channel_id: str):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
| 
						 | 
					@ -104,7 +104,7 @@ class News(commands.Cog):
 | 
				
			||||||
        data.dump_guild_data(ctx.guild.id, NEWS_JSON, news_json)
 | 
					        data.dump_guild_data(ctx.guild.id, NEWS_JSON, news_json)
 | 
				
			||||||
        return await ctx.respond(f"News channel set to {channel.mention}.", ephemeral=True)
 | 
					        return await ctx.respond(f"News channel set to {channel.mention}.", ephemeral=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @news.command(description="Posts news of given id to set channel.")
 | 
					    @news.command(description="Synchronize news feed.")
 | 
				
			||||||
    @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):
 | 
				
			||||||
        err = await post_news(self.bot, ctx.guild, id)
 | 
					        err = await post_news(self.bot, ctx.guild, id)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue