aboutsummaryrefslogtreecommitdiff
path: root/cogs
diff options
context:
space:
mode:
authorziro <palembani@gmail.com>2020-08-05 04:40:54 +0000
committerziro <palembani@gmail.com>2020-08-05 04:40:54 +0000
commitdbc3db1f273ec42e20227368705b77bf690ba5a8 (patch)
tree2070a0014c6b6c61a756a4dabf222f16414099d9 /cogs
parentf228c685e9365dbdacf6265610e8a1218cafe9d1 (diff)
downloadsteve-bot-dbc3db1f273ec42e20227368705b77bf690ba5a8.tar
steve-bot-dbc3db1f273ec42e20227368705b77bf690ba5a8.tar.gz
steve-bot-dbc3db1f273ec42e20227368705b77bf690ba5a8.tar.bz2
steve-bot-dbc3db1f273ec42e20227368705b77bf690ba5a8.tar.lz
steve-bot-dbc3db1f273ec42e20227368705b77bf690ba5a8.tar.xz
steve-bot-dbc3db1f273ec42e20227368705b77bf690ba5a8.tar.zst
steve-bot-dbc3db1f273ec42e20227368705b77bf690ba5a8.zip
+ Certain roles now required to use moderator commands
Diffstat (limited to 'cogs')
-rw-r--r--cogs/general.py2
-rw-r--r--cogs/moderator.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/cogs/general.py b/cogs/general.py
index c041f90..68caf54 100644
--- a/cogs/general.py
+++ b/cogs/general.py
@@ -13,7 +13,7 @@ class General(commands.Cog):
@commands.command(aliases=['source'])
async def sauce(self, ctx):
- git_link = "<PutLinkHere>"
+ git_link = "https://github.com/null2264/ziBot"
await ctx.send(f"ziBot's Source Code: \n {git_link}")
def setup(bot):
diff --git a/cogs/moderator.py b/cogs/moderator.py
index ebc25cf..15e9d18 100644
--- a/cogs/moderator.py
+++ b/cogs/moderator.py
@@ -7,11 +7,13 @@ class Admin(commands.Cog):
self.bot = bot
@commands.command(aliases=['quit'], hidden=True)
+ @commands.has_any_role("Server Moderator","Zi")
async def force_exit(self, ctx):
await ctx.send("Self Destructing!")
await ctx.bot.close()
@commands.command(aliases=['unload'], hidden=True)
+ @commands.has_any_role("Server Moderator","Zi")
async def _unload(self, ctx, ext):
await ctx.send(f"Unloading {ext}...")
try:
@@ -25,6 +27,7 @@ class Admin(commands.Cog):
await ctx.send(f"{ext} failed to unload!")
@commands.command(aliases=['reload'], hidden=True)
+ @commands.has_any_role("Server Moderator","Zi")
async def _reload(self, ctx, ext):
await ctx.send(f"Reloading {ext}...")
try:
@@ -38,6 +41,7 @@ class Admin(commands.Cog):
await ctx.send(f"{ext} failed to reload!")
@commands.command(aliases=['load'], hidden=True)
+ @commands.has_any_role("Server Moderator","Zi")
async def _load(self, ctx, ext):
await ctx.send(f"Loading {ext}...")
try:
@@ -49,6 +53,7 @@ class Admin(commands.Cog):
await ctx.send(f"{ext} failed to load!")
@commands.command(aliases=['clearchat'], hidden=True)
+ @commands.has_any_role("Server Moderator","Zi")
async def _clearchat(self, ctx, numb: int=50):
deleted_msg = await ctx.message.channel.purge(limit=int(numb)+1, check=None, before=None, after=None, around=None, oldest_first=False, bulk=True)
d.Alex Ning1-1/+1 2019-10-29Fixed UI issues in posts and comments. Version 1.4.0.Alex Ning14-322/+171 2019-10-29Placing vote buttons on the right for comments is now available.Alex Ning7-24/+210 2019-10-29Make Placing vote buttons on the right an option.Alex Ning42-196/+334