diff --git a/akuma.py b/akuma.py index 2aa78aa..4d4ddc9 100644 --- a/akuma.py +++ b/akuma.py @@ -2,19 +2,22 @@ import json import discord from discord.ext import commands -#config file -c = json.load(open("settings.json", "r")) -s = json.load(open("server.json", "r")) - -#The Bot itself -bot = commands.Bot(description=c["description"], command_prefix=c["prefix"]) +cFile = "settings.json" +sFile = "server.json" +#config file +c = json.load(open(cFile, "r")) +s = json.load(open(sFile, "r")) + #Function to write changed config to JSON file def writeConfig(data): - json.dump(data, open("settings.json", "w"), indent=4) + json.dump(data, open(cFile, "w"), indent=4) def writeServer(data): - json.dump(data, open("server.json", "w"), indent=4) + json.dump(data, open(sFile, "w"), indent=4) + +#The Bot itself +bot = commands.Bot(description=c["description"], command_prefix=c["prefix"]) @bot.event async def on_ready(): @@ -32,10 +35,6 @@ async def on_guild_remove(guild): del s[str(guild.id)] writeServer(s) -@bot.command() -async def invite(ctx): - await ctx.send("https://discordapp.com/oauth2/authorize?client_id={}&scope=bot&permissions=8".format(bot.user.id)) - @bot.command(hidden=True) async def printExt(ctx): """Prints out every loaded extension""" diff --git a/extensions/user.py b/extensions/user.py index 1428aa3..f7cd97c 100644 --- a/extensions/user.py +++ b/extensions/user.py @@ -11,6 +11,12 @@ class User(): """Prints the greeting text a user receives by joining the server""" await ctx.send(s[str(ctx.guild.id)]["joinMessage"]) + @commands.command() + async def botinvite(self, ctx): + await ctx.send("""Invite Link: + \nPlease read for informations""".format(self.bot.user.id)) + + @commands.command() async def suggest(self, ctx, *, msg : str): """Makes a suggestion to the moderation team.