Botinvite Message
This commit is contained in:
		
							
								
								
									
										23
									
								
								akuma.py
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								akuma.py
									
									
									
									
									
								
							| @@ -2,19 +2,22 @@ import json | |||||||
| import discord | import discord | ||||||
| from discord.ext import commands | from discord.ext import commands | ||||||
|  |  | ||||||
| #config file | cFile = "settings.json" | ||||||
| c = json.load(open("settings.json", "r")) | sFile = "server.json" | ||||||
| s = json.load(open("server.json", "r")) |  | ||||||
|      |  | ||||||
| #The Bot itself |  | ||||||
| bot = commands.Bot(description=c["description"], command_prefix=c["prefix"]) |  | ||||||
|  |  | ||||||
|  | #config file | ||||||
|  | c = json.load(open(cFile, "r")) | ||||||
|  | s = json.load(open(sFile, "r")) | ||||||
|  |      | ||||||
| #Function to write changed config to JSON file | #Function to write changed config to JSON file | ||||||
| def writeConfig(data): | def writeConfig(data): | ||||||
|     json.dump(data, open("settings.json", "w"), indent=4) |     json.dump(data, open(cFile, "w"), indent=4) | ||||||
|  |  | ||||||
| def writeServer(data): | 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 | @bot.event | ||||||
| async def on_ready(): | async def on_ready(): | ||||||
| @@ -32,10 +35,6 @@ async def on_guild_remove(guild): | |||||||
|     del s[str(guild.id)] |     del s[str(guild.id)] | ||||||
|     writeServer(s) |     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) | @bot.command(hidden=True) | ||||||
| async def printExt(ctx): | async def printExt(ctx): | ||||||
|     """Prints out every loaded extension""" |     """Prints out every loaded extension""" | ||||||
|   | |||||||
| @@ -11,6 +11,12 @@ class User(): | |||||||
|         """Prints the greeting text a user receives by joining the server""" |         """Prints the greeting text a user receives by joining the server""" | ||||||
|         await ctx.send(s[str(ctx.guild.id)]["joinMessage"]) |         await ctx.send(s[str(ctx.guild.id)]["joinMessage"]) | ||||||
|  |  | ||||||
|  |     @commands.command() | ||||||
|  |     async def botinvite(self, ctx): | ||||||
|  |         await ctx.send("""Invite Link: <https://discordapp.com/oauth2/authorize?client_id={}&scope=bot&permissions=8> | ||||||
|  |         \nPlease read <https://github.com/Akumatic/Akuma-Matata/blob/master/README.md> for informations""".format(self.bot.user.id)) | ||||||
|  |  | ||||||
|  |  | ||||||
|     @commands.command() |     @commands.command() | ||||||
|     async def suggest(self, ctx, *, msg : str): |     async def suggest(self, ctx, *, msg : str): | ||||||
|         """Makes a suggestion to the moderation team.  |         """Makes a suggestion to the moderation team.  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Akumatic
					Akumatic