Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import traceback
- import psutil
- import os
- import asyncio
- from discord.ext import commands
- from utils import default
- class Help:
- def __init__(self, bot):
- self.bot = bot
- self.config = default.get("config.json")
- @commands.group(pass_context=True, name='help', aliases=['cmds', 'h'])
- async def _help(self, ctx):
- """ Class for help commands. """
- if ctx.invoked_subcommand is None:
- embed = discord.Embed(colour=ctx.me.top_role.colour)
- embed.set_thumbnail(url=ctx.bot.user.avatar_url)
- embed.add_field(name="Moderation", value=".help Moderation", inline=False)
- embed.add_field(name="Developer Functions", value=".help Developer", inline=False)
- embed.add_field(name="Entertainment", value=".help Fun", inline=False)
- embed.add_field(name="Event Management", value=".help Event", inline=False)
- embed.add_field(name="Utility", value=".help Utility", inline=False)
- embed.add_field(name="Music", value=".help Music", inline=False)
- await ctx.send(content=f"Please, choose a help category.", embed=embed)
- @_help.command(pass_context=True, name='Moderation', aliases=['mod', 'Mod', 'moderation'])
- async def _mod(self, ctx):
- """ Moderation Commands """
- embed = discord.Embed(colour=ctx.me.top_role.colour)
- embed.set_thumbnail(url=ctx.bot.user.avatar_url)
- embed.add_field(name=".ban <user.id> [reason]", value="Bans an user from the server.", inline=False)
- embed.add_field(name=".find <query>", value="Finds an user through search query.", inline=False)
- embed.add_field(name=".kick <user.id> [reason]", value="Kicks an user from the server.", inline=False)
- embed.add_field(name=".massban [reason] <user.mentions>", value="Bans multiple users at once with the same reason.", inline=False)
- embed.add_field(name=".mute <user.id> [reason]", value="Gives **Muted** role to an user.", inline=False)
- embed.add_field(name=".nickname <user.id> [nickname]", value="Changes the nickname of a certain user.", inline=False)
- embed.add_field(name=".prune", value="Cleans messages in a certain channel.", inline=False)
- embed.add_field(name=".unban <user.id> [reason]", value="Unbans an user from the server.", inline=False)
- embed.add_field(name=".unmute <user.id> [reason]", value="Removes the **Muted** role from a certain user.")
- await ctx.send(embed=embed)
- def setup(bot):
- bot.remove_command('help')
- bot.add_cog(Help(bot))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement