Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
FTW-Bot/bot.py

55 lines
2 KiB
Python
Raw Normal View History

import json
2017-12-02 11:27:16 +01:00
import discord
from discord.ext import commands
with open('config.json') as json_data_file:
parameter = json.load(json_data_file)
bot = commands.Bot(command_prefix=parameter['Bot']['prefix'], description=parameter['Bot']['description'])
bot.remove_command("help")
2017-12-02 11:27:16 +01:00
#Démarrage
@bot.event
async def on_ready():
print("Définition du statu de base")
await bot.change_presence(game=discord.Game(name=parameter['Bot']['statu']))
2017-12-02 11:27:16 +01:00
print("Démarrage de DefaultCMD")
bot.load_extension("DefaultCMD")
print("Démarrage de Administration")
bot.load_extension("Administration")
2017-12-02 11:27:16 +01:00
print("Démarrage de Benne_a_ordure")
bot.load_extension("Benne_a_ordure")
2017-12-02 11:27:16 +01:00
print("Démarrage de Reactionner")
bot.load_extension("Reactionner")
print("Démarrage de Garou")
bot.load_extension("Garou")
print("Démarrage de Music")
bot.load_extension("Music")
2017-12-02 11:27:16 +01:00
print("FTW's Bot operationelle")
embed=discord.Embed(title="Administration", description="", color=0xffff00)
embed.set_thumbnail(url="https://icon-icons.com/icons2/562/PNG/512/on-off-power-button_icon-icons.com_53938.png")
embed.add_field(name="Démarrage", value="FTW's Bot operationelle", inline=False)
channel = bot.get_channel("389209382388498445")
await bot.send_message(channel, embed=embed)
2017-12-02 11:27:16 +01:00
@bot.command(pass_context=True)
async def help(ctx):
embed=discord.Embed(title="Music", description="Aide", color=0x80ff00)
embed.set_thumbnail(url="https://cdn4.iconfinder.com/data/icons/ionicons/512/icon-help-128.png")
embed.add_field(name="basic", value="Pour voir les commands basique faite: ```basic```", inline=True)
embed.add_field(name="Garou", value="Pour voir les commands du Garou faite: ```lg help```", inline=True)
embed.add_field(name="Music", value="Pour voir les commandes pour la musique faite: ```music help```", inline=True)
await bot.say(embed=embed)
2017-12-02 11:27:16 +01:00
2017-12-06 22:23:19 +01:00
bot.run(parameter['Bot']['token'])