mirror of
https://github.com/SamSanai/VoiceMaster-Discord-Bot.git
synced 2024-11-22 01:45:32 +01:00
load_extension updated
This commit is contained in:
parent
5049644ace
commit
7b213af416
@ -76,7 +76,7 @@ class voice(commands.Cog):
|
|||||||
@commands.command()
|
@commands.command()
|
||||||
async def help(self, ctx):
|
async def help(self, ctx):
|
||||||
embed = discord.Embed(title="Help", description="",color=0x7289da)
|
embed = discord.Embed(title="Help", description="",color=0x7289da)
|
||||||
embed.set_author(name=f"{ctx.guild.me.display_name}",url="https://discordbots.org/bot/472911936951156740", icon_url=f"{ctx.guild.me.avatar_url}")
|
embed.set_author(name=f"{ctx.guild.me.display_name}",url="https://discordbots.org/bot/472911936951156740", icon_url=f"{ctx.guild.me.display_avatar.url}")
|
||||||
embed.add_field(name=f'**Commands**', value=f'**Lock your channel by using the following command:**\n\n`.voice lock`\n\n------------\n\n'
|
embed.add_field(name=f'**Commands**', value=f'**Lock your channel by using the following command:**\n\n`.voice lock`\n\n------------\n\n'
|
||||||
f'**Unlock your channel by using the following command:**\n\n`.voice unlock`\n\n------------\n\n'
|
f'**Unlock your channel by using the following command:**\n\n`.voice unlock`\n\n------------\n\n'
|
||||||
f'**Change your channel name by using the following command:**\n\n`.voice name <name>`\n\n**Example:** `.voice name EU 5kd+`\n\n------------\n\n'
|
f'**Change your channel name by using the following command:**\n\n`.voice name <name>`\n\n**Example:** `.voice name EU 5kd+`\n\n------------\n\n'
|
||||||
@ -304,5 +304,5 @@ class voice(commands.Cog):
|
|||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
async def setup(bot):
|
||||||
bot.add_cog(voice(bot))
|
await bot.add_cog(voice(bot))
|
||||||
|
@ -15,14 +15,6 @@ DISCORD_TOKEN = 'Enter Discord Token here'
|
|||||||
|
|
||||||
initial_extensions = ['cogs.voice']
|
initial_extensions = ['cogs.voice']
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
for extension in initial_extensions:
|
|
||||||
try:
|
|
||||||
bot.load_extension(extension)
|
|
||||||
except Exception as e:
|
|
||||||
print(f'Failed to load extension {extension}.', file=sys.stderr)
|
|
||||||
traceback.print_exc()
|
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
print('Logged in as')
|
print('Logged in as')
|
||||||
@ -30,4 +22,12 @@ async def on_ready():
|
|||||||
print(bot.user.id)
|
print(bot.user.id)
|
||||||
print('------')
|
print('------')
|
||||||
|
|
||||||
|
for extension in initial_extensions:
|
||||||
|
try:
|
||||||
|
await bot.load_extension(extension)
|
||||||
|
print(f'Loaded {extension}')
|
||||||
|
except Exception as e:
|
||||||
|
print(f'Failed to load extension {extension}.', file=sys.stderr)
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
bot.run(DISCORD_TOKEN)
|
bot.run(DISCORD_TOKEN)
|
||||||
|
Loading…
Reference in New Issue
Block a user