Get membercount and rules commands done

This commit is contained in:
Ave Ozkal 2018-12-23 16:39:26 +03:00
parent 567f5ccf5d
commit 3f3147bf17
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B
3 changed files with 17 additions and 1 deletions

View file

@ -10,7 +10,7 @@ Based on https://gitlab.com/ao/dpybotbase
## TODO
- [x] .py configs
- [ ] membercount command
- [x] membercount command
- [ ] Verification (and reset)
- [ ] Logging joins, leaves, role changes, deletes, bans, kicks
- [ ] Moderation commands (ban, kick, approve, revoke, addhacker, removehacker, lock, unlock, softlock, mute, unmute, playing, botnickname, nickname, clear)

View file

@ -1,6 +1,7 @@
import time
import config
import discord
from discord.ext import commands
@ -13,6 +14,20 @@ class Basic:
"""Says hello. Duh."""
await ctx.send(f"Hello {ctx.author.mention}!")
@commands.command()
async def rules(self, ctx, *, targetuser: discord.Member = None):
"""Post a link to the Rules"""
if not targetuser:
targetuser = ctx.author
await ctx.send(f"{targetuser.mention}: A link to the rules "
f"can be found here: {config.rules_url}")
@commands.command()
async def membercount(self, ctx):
"""Prints the member count of the server."""
await ctx.send(f"{ctx.guild.name} has "
f"{ctx.guild.member_count} members!")
@commands.command()
async def source(self, ctx):
"""Gives link to source code."""

View file

@ -8,6 +8,7 @@ guild_whitelist = [
]
source_url = "https://github.com/aveao/robocop-ng"
rules_url = "https://reswitched.team/discord/"
bot_manager_role_id = 526372554081042462 # Bot management role in NotSwitched
staff_role_ids = [526384077679624192, # Team role in NotSwitched