|
|
@ -5,15 +5,22 @@ import discord
|
|
|
|
from discord.ext import commands
|
|
|
|
from discord.ext import commands
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set up the Cog
|
|
|
|
class CustomHelp(commands.Cog):
|
|
|
|
class CustomHelp(commands.Cog):
|
|
|
|
def __init__(self, bot):
|
|
|
|
def __init__(self, bot):
|
|
|
|
self.bot = bot
|
|
|
|
self.bot = bot
|
|
|
|
|
|
|
|
|
|
|
|
@commands.command()
|
|
|
|
# ~help command allows the user to look at the list of commands
|
|
|
|
|
|
|
|
@commands.command(aliases="Help")
|
|
|
|
async def help(self, ctx):
|
|
|
|
async def help(self, ctx):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Allowing the bot to dm the user
|
|
|
|
author = ctx.message.author
|
|
|
|
author = ctx.message.author
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Surround with try/except to catch any exceptions that may occur
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set up embed to list all the commands within the bot
|
|
|
|
embed = discord.Embed(title="```(っ◔◡◔)っ Ensō Commands```", colour=discord.Colour.orange())
|
|
|
|
embed = discord.Embed(title="```(っ◔◡◔)っ Ensō Commands```", colour=discord.Colour.orange())
|
|
|
|
|
|
|
|
|
|
|
|
embed.timestamp = datetime.datetime.utcnow()
|
|
|
|
embed.timestamp = datetime.datetime.utcnow()
|
|
|
@ -146,8 +153,10 @@ class CustomHelp(commands.Cog):
|
|
|
|
"\n *(Perms: Co-Owner)*",
|
|
|
|
"\n *(Perms: Co-Owner)*",
|
|
|
|
inline=True)
|
|
|
|
inline=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Dm the user the embedded message
|
|
|
|
await author.send(embed=embed)
|
|
|
|
await author.send(embed=embed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Send the helpDm() message to the channel that the user is in
|
|
|
|
message = await ctx.send(helpDm())
|
|
|
|
message = await ctx.send(helpDm())
|
|
|
|
|
|
|
|
|
|
|
|
# Let the user read the message for 2.5 seconds
|
|
|
|
# Let the user read the message for 2.5 seconds
|
|
|
@ -158,13 +167,19 @@ class CustomHelp(commands.Cog):
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|
print(e)
|
|
|
|
print(e)
|
|
|
|
|
|
|
|
|
|
|
|
# Bot ~rules command allows for an embed message about the leveled roles and xp system
|
|
|
|
# ~rules command allows for an embed message about the leveled roles and xp system
|
|
|
|
@commands.command(aliases=["Rules", "rule", "Rule"])
|
|
|
|
@commands.command(aliases=["Rules", "rule", "Rule"])
|
|
|
|
async def rules(self, ctx):
|
|
|
|
async def rules(self, ctx):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Allowing the bot to dm the user
|
|
|
|
author = ctx.message.author
|
|
|
|
author = ctx.message.author
|
|
|
|
|
|
|
|
# Define Izzy's roles ID
|
|
|
|
izzyID = '<@397944038440828928'
|
|
|
|
izzyID = '<@397944038440828928'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Surround with try/except to catch any exceptions that may occur
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set up embed to list all the rules within the server
|
|
|
|
embed = discord.Embed(title="```(っ◔◡◔)っ Ensō Rules```", colour=discord.Colour(0xFF69B4),
|
|
|
|
embed = discord.Embed(title="```(っ◔◡◔)っ Ensō Rules```", colour=discord.Colour(0xFF69B4),
|
|
|
|
description="``` ヽ(͡◕ ͜ʖ ͡◕)ノ Please respect the following rules that are going to be listed below ヽ(͡◕ ͜ʖ ͡◕)ノ ```")
|
|
|
|
description="``` ヽ(͡◕ ͜ʖ ͡◕)ノ Please respect the following rules that are going to be listed below ヽ(͡◕ ͜ʖ ͡◕)ノ ```")
|
|
|
|
|
|
|
|
|
|
|
@ -263,23 +278,31 @@ class CustomHelp(commands.Cog):
|
|
|
|
f", or my co-owner, {izzyID}**",
|
|
|
|
f", or my co-owner, {izzyID}**",
|
|
|
|
inline=False)
|
|
|
|
inline=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Dm the user the embedded message
|
|
|
|
await author.send(embed=embed)
|
|
|
|
await author.send(embed=embed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Send the helpDm() message to the channel that the user is in
|
|
|
|
message = await ctx.send(helpDm())
|
|
|
|
message = await ctx.send(helpDm())
|
|
|
|
|
|
|
|
|
|
|
|
# Let the user read the message for 2.5 seconds
|
|
|
|
# Let the user read the message for 2.5 seconds
|
|
|
|
await asyncio.sleep(10)
|
|
|
|
await asyncio.sleep(10)
|
|
|
|
# Delete the message
|
|
|
|
# Delete the message
|
|
|
|
await message.delete()
|
|
|
|
await message.delete()
|
|
|
|
|
|
|
|
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|
print(e)
|
|
|
|
print(e)
|
|
|
|
|
|
|
|
|
|
|
|
# Bot ~roles command allows for an embed message about roles
|
|
|
|
# ~roles command allows for an embed message about roles
|
|
|
|
@commands.command()
|
|
|
|
@commands.command()
|
|
|
|
async def roles(self, ctx):
|
|
|
|
async def roles(self, ctx):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Allowing the bot to dm the user
|
|
|
|
author = ctx.message.author
|
|
|
|
author = ctx.message.author
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Surround with try/except to catch any exceptions that may occur
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Setting up embedded message about the leveled roles systme within the server
|
|
|
|
embed = discord.Embed(title="```So you wanna know how the leveled roles system works huh?```",
|
|
|
|
embed = discord.Embed(title="```So you wanna know how the leveled roles system works huh?```",
|
|
|
|
colour=discord.Colour(0x30e419),
|
|
|
|
colour=discord.Colour(0x30e419),
|
|
|
|
description="------------------------------------------------")
|
|
|
|
description="------------------------------------------------")
|
|
|
@ -307,18 +330,22 @@ class CustomHelp(commands.Cog):
|
|
|
|
"amount of experience**",
|
|
|
|
"amount of experience**",
|
|
|
|
inline=False)
|
|
|
|
inline=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Dm the user the embedded message
|
|
|
|
await author.send(embed=embed)
|
|
|
|
await author.send(embed=embed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Send the helpDm() message to the channel that the user is in
|
|
|
|
message = await ctx.send(helpDm())
|
|
|
|
message = await ctx.send(helpDm())
|
|
|
|
|
|
|
|
|
|
|
|
# Let the user read the message for 2.5 seconds
|
|
|
|
# Let the user read the message for 2.5 seconds
|
|
|
|
await asyncio.sleep(10)
|
|
|
|
await asyncio.sleep(10)
|
|
|
|
# Delete the message
|
|
|
|
# Delete the message
|
|
|
|
await message.delete()
|
|
|
|
await message.delete()
|
|
|
|
|
|
|
|
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|
print(e)
|
|
|
|
print(e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Send a message to the channel that Enso~Chan has dm'ed them!
|
|
|
|
def helpDm():
|
|
|
|
def helpDm():
|
|
|
|
hamothyID = '<@&715412394968350756>'
|
|
|
|
hamothyID = '<@&715412394968350756>'
|
|
|
|
|
|
|
|
|
|
|
|