main.py 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. import os
  2. from dotenv import load_dotenv
  3. import discord
  4. from discord.ext import commands
  5. from discord.commands import Option
  6. from discord.commands import slash_command
  7. from datetime import datetime
  8. import configparser
  9. import mysql.connector
  10. intents = discord.Intents.default()
  11. intents.message_content = True
  12. intents.members = True
  13. intents.guilds = True
  14. intents.reactions = True
  15. client = discord.Client(intents=intents)
  16. #------#
  17. #Load .env file
  18. load_dotenv()
  19. token = os.getenv("TOKEN")
  20. if token is None:
  21. raise ValueError("TOKEN not found in .env file")
  22. debug_guilds_up = []
  23. server_token = os.getenv("SERVER").split(",")
  24. for i in range(len(server_token)):
  25. debug_guilds_up.append(int(server_token[i]))
  26. dbhost = os.getenv("HOST")
  27. if dbhost is None:
  28. raise ValueError("HOST not found in .env file")
  29. dbname = os.getenv("NAME")
  30. if dbname is None:
  31. raise ValueError("NAME not found in .env file")
  32. dbpsswd = os.getenv("PASSWORD")
  33. if dbpsswd is None:
  34. raise ValueError("PASSWORD not found in .env file")
  35. dbdb = os.getenv("DATABASE")
  36. if dbdb is None:
  37. raise ValueError("DATABASE not found in .env file")
  38. #------#
  39. #ConfigParser
  40. config = configparser.RawConfigParser()
  41. configFilePath = r'config.cfg'
  42. config.read_file(open(configFilePath))
  43. label_rules = config.get('Reactionroles Rules', 'label_rules')
  44. role_rules = config.get('Reactionroles Rules', 'rules_role')
  45. channel_log = config.get('Logs', 'channel_log')
  46. channel_banlog = config.get('Logs', 'ban_log')
  47. #------#
  48. #Database initialization
  49. conn = mysql.connector.connect(
  50. host=dbhost,
  51. user=dbname,
  52. password=dbpsswd
  53. )
  54. cursor = conn.cursor()
  55. conn.database = dbdb
  56. cursor.execute("""
  57. CREATE TABLE IF NOT EXISTS User (
  58. id INT AUTO_INCREMENT PRIMARY KEY,
  59. userid BIGINT,
  60. discordname VARCHAR(100),
  61. roles INT
  62. )
  63. """)
  64. cursor.execute("""
  65. CREATE TABLE IF NOT EXISTS Warns (
  66. id INT AUTO_INCREMENT PRIMARY KEY,
  67. userid BIGINT,
  68. username VARCHAR(100),
  69. moderatorname VARCHAR(100),
  70. reason VARCHAR(250),
  71. date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
  72. )
  73. """)
  74. cursor.execute("""
  75. CREATE TABLE IF NOT EXISTS Bans (
  76. id INT AUTO_INCREMENT PRIMARY KEY,
  77. userid BIGINT,
  78. username VARCHAR(100),
  79. moderatorname VARCHAR(100),
  80. reason VARCHAR(250),
  81. date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
  82. )
  83. """)
  84. cursor.execute("""
  85. CREATE TABLE IF NOT EXISTS Unbans (
  86. id INT AUTO_INCREMENT PRIMARY KEY,
  87. userid BIGINT,
  88. username VARCHAR(100),
  89. moderatorname VARCHAR(100),
  90. reason VARCHAR(250),
  91. date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
  92. )
  93. """
  94. )
  95. cursor.execute("""
  96. CREATE TABLE IF NOT EXISTS Kick (
  97. id INT AUTO_INCREMENT PRIMARY KEY,
  98. userid BIGINT,
  99. username VARCHAR(100),
  100. moderatorname VARCHAR(100),
  101. reason VARCHAR(250),
  102. date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
  103. )
  104. """)
  105. #------#
  106. #Initialize Bot
  107. bot = commands.Bot(
  108. command_prefix=commands.when_mentioned_or("!"),
  109. description="VicePD Bot",
  110. intents=intents,
  111. debug_guilds=debug_guilds_up if debug_guilds_up else None
  112. )
  113. async def load_extensions():
  114. cogs_dir = "cogs"
  115. if not os.path.exists(cogs_dir):
  116. return
  117. for filename in os.listdir(cogs_dir):
  118. if filename.endswith(".py"):
  119. cog_list = os.path.splitext(filename)[0]
  120. print(cog_list)
  121. bot.load_extension(f"cogs.{cog_list}")
  122. class Admin(commands.Cog):
  123. def __init__(self, bot):
  124. self.bot = bot
  125. #------#
  126. #Print in Log if error occurs
  127. @bot.event
  128. async def on_application_command_error(ctx, error):
  129. channel = discord.utils.get(ctx.guild.channels, id=int(channel_log))
  130. if channel:
  131. await channel.send(f"Error occurred: {str(error)}")
  132. #---------------------------------#
  133. #Bot Online Console
  134. @bot.event
  135. async def on_ready():
  136. print(f"{bot.user} ist online")
  137. if bot.guilds:
  138. channel = discord.utils.get(bot.guilds[0].channels, id=int(channel_log))
  139. if channel:
  140. await channel.send(f"{bot.user} ist online")
  141. await load_extensions()
  142. bot.add_view(PersistentRoleView()) #loading reactionrole memory
  143. #---------------------------------------------------------------------------------------#
  144. #DONT Touch anything above this line, unless you know what you are doing!#
  145. #---------------------------------------------------------------------------------------#
  146. #---------------------------------#
  147. ## Greet
  148. @bot.slash_command(description="Greet a User")
  149. async def greet(ctx, user: str = Option(discord.User, "The user, you want to greet")):
  150. await ctx.respond(f"Hello {user.mention}")
  151. #---------------------------------#
  152. #---------------------------------#
  153. ## Say
  154. """@bot.slash_command(description="Let the bot send a message")
  155. async def say(
  156. ctx,
  157. text: str = Option(description="Input the text you want to send"),
  158. channel_input: discord.TextChannel = Option(description="Select the channel,where you want to send the message.")
  159. ):
  160. channel= discord.utils.get(ctx.guild.channels, id = int(channel_input[2:-1]))
  161. await channel.send(text)
  162. await ctx.respond("Message sent", ephemeral=True)"""
  163. #---------------------------------#
  164. #---------------------------------#
  165. ## Userinfo
  166. @bot.slash_command(name="userinfo", description="Show informations of a user from this server")
  167. async def userinfo(
  168. ctx,
  169. user: str = Option(discord.User, "Select User"),
  170. ):
  171. if user is None:
  172. user = ctx.author
  173. elif user not in ctx.guild.members:
  174. await ctx.respond("The selected user is not a member on this Server!", ephemeral=True)
  175. return
  176. elif user == bot.user:
  177. await ctx.respond(f"This is me - the {bot.user}", ephemeral=True)
  178. return
  179. embed = discord.Embed(
  180. title=f"Information about *{user.name}*",
  181. description=f"Here you see all details about {user.mention}",
  182. color=discord.Color.blue()
  183. )
  184. time = discord.utils.format_dt(user.created_at, "R")
  185. embed.add_field(name="Account creation date", value=time, inline=False)
  186. if len(user.roles) >= 2:
  187. embed.add_field(name="Roles", value=", ".join([role.mention for role in user.roles if role.name != "@everyone"]), inline=False)
  188. else:
  189. embed.add_field(name="Roles", value="User has no roles", inline=False)
  190. embed.add_field(name="Server join date", value=discord.utils.format_dt(user.joined_at, "R"), inline=False)
  191. embed.add_field(name="User ID", value=user.id)
  192. embed.set_thumbnail(url=user.display_avatar.url)
  193. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  194. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  195. await ctx.respond(embed=embed)
  196. #---------------------------------#
  197. #_________________________________#
  198. #BAN SYSTEM
  199. #---------------------------------#
  200. ##Ban
  201. @bot.slash_command(name="ban", description="Ban a user from this Server")
  202. async def ban(
  203. ctx,
  204. user: Option(discord.User, description = "Select User", required=True), # type: ignore
  205. reason: Option(str, description = "Reason for the ban", default="No reason provided") # type: ignore
  206. ):
  207. if not ctx.author.guild_permissions.ban_members:
  208. await ctx.respond("Error: You don't have the permission to ban Members!", ephemeral=True)
  209. return
  210. if user == bot.user:
  211. await ctx.respond("Error: I can't ban myself!", ephemeral=True)
  212. return
  213. if user == ctx.author:
  214. await ctx.respond("Error: You can't ban yourself!", ephemeral=True)
  215. return
  216. channel= discord.utils.get(ctx.guild.channels, id = int(channel_banlog))
  217. embed = discord.Embed(
  218. title=f"Ban of **{user.name}**",
  219. description=f"User {user.mention} has been banned from the Server",
  220. color=discord.Color.red()
  221. )
  222. time = discord.utils.format_dt(datetime.now(), "f")
  223. embed.add_field(name="Ban Date", value=time, inline=False)
  224. embed.add_field(name="Moderator", value=f"{ctx.author}", inline=False)
  225. embed.add_field(name="Reason", value=reason, inline=False)
  226. embed.add_field(name="User ID", value=user.id)
  227. embed.set_thumbnail(url=user.display_avatar.url)
  228. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  229. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  230. try:
  231. await ctx.guild.ban(user, reason=reason)
  232. await ctx.respond(f"User {user.mention} has been banned from this Server!", ephemeral=True)
  233. await channel.send(embed=embed)
  234. cursor.execute(
  235. "INSERT INTO Bans (userid, username, moderatorname, reason) VALUES (%s, %s, %s, %s)",
  236. (user.id, str(user), str(ctx.author), reason)
  237. )
  238. conn.commit()
  239. except discord.Forbidden:
  240. await ctx.respond("Error: I don't have permission to ban this user.", ephemeral=True)
  241. except discord.HTTPException as e:
  242. await ctx.respond(f"Error: Could not ban User {user.mention}. Reason: {e}", ephemeral=True)
  243. except Exception as e:
  244. await ctx.respond(f"Unexpected error: {e}", ephemeral=True)
  245. #---------------------------------#
  246. #Unban
  247. @bot.slash_command(name="unban", description="Unban a user from this Server")
  248. async def unban(
  249. ctx,
  250. user: Option(discord.User, description = "Insert User ID", required=True), # type: ignore
  251. reason: Option(str, description = "Reason for the unbanning", default="No reason provided") # type: ignore
  252. ):
  253. if not ctx.author.guild_permissions.ban_members:
  254. await ctx.respond("Error: You don't have the permission to unban Members!", ephemeral=True)
  255. return
  256. if user == bot.user:
  257. await ctx.respond("Error: I can't unban myself!", ephemeral=True)
  258. return
  259. if user == ctx.author:
  260. await ctx.respond("Error: You can't unban yourself!", ephemeral=True)
  261. return
  262. if user in ctx.guild.members:
  263. await ctx.respond("Error: This user is not banned!", ephemeral=True)
  264. return
  265. channel= discord.utils.get(ctx.guild.channels, id = int(channel_banlog))
  266. embed = discord.Embed(
  267. title=f"Unban of **{user.name}**",
  268. description=f"User {user.mention} was unbanned from this server.",
  269. color=discord.Color.green()
  270. )
  271. time = discord.utils.format_dt(datetime.now(), "f")
  272. embed.add_field(name="Unban Date", value=time, inline=False)
  273. embed.add_field(name="Moderator", value=f"{ctx.author}", inline=False)
  274. embed.add_field(name="Reason", value=reason, inline=False)
  275. embed.add_field(name="User ID", value=user.id)
  276. embed.set_thumbnail(url=user.display_avatar.url)
  277. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  278. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  279. try:
  280. await ctx.guild.unban(user, reason=reason)
  281. await ctx.respond(f"User {user.mention} is now unbanned!", ephemeral=True)
  282. await channel.send(embed=embed)
  283. cursor.execute(
  284. "INSERT INTO Unbans (userid, username, moderatorname, reason) VALUES (%s, %s, %s, %s)",
  285. (user.id, str(user), str(ctx.author), reason)
  286. )
  287. conn.commit()
  288. except discord.Forbidden:
  289. await ctx.respond("Error: I don't have permission to unban this user.", ephemeral=True)
  290. except discord.HTTPException as e:
  291. await ctx.respond(f"Error: Could not unban User {user.mention}. Reason: {e}", ephemeral=True)
  292. except Exception as e:
  293. await ctx.respond(f"Unexpected error: {e}", ephemeral=True)
  294. #---------------------------------#
  295. #_________________________________#
  296. #---------------------------------#
  297. #Kick
  298. @bot.slash_command(name="kick", description="Kick a user from this Server")
  299. async def kick(
  300. ctx,
  301. user: Option(discord.User, description = "Select User", required=True), # type: ignore
  302. reason: Option(str, description = "Reason for the ban", default="No reason provided") # type: ignore
  303. ):
  304. if not ctx.author.guild_permissions.kick_members:
  305. await ctx.respond("Error: You don't have the permission to kick Members!", ephemeral=True)
  306. return
  307. if user == bot.user:
  308. await ctx.respond("Error: I can't kick myself!", ephemeral=True)
  309. return
  310. if user == ctx.author:
  311. await ctx.respond("Error: You can't kick yourself!", ephemeral=True)
  312. return
  313. try:
  314. await ctx.guild.kick(user, reason=reason)
  315. await ctx.respond(f"User {user.mention} has been kicked from this Server!", ephemeral=True)
  316. cursor.execute(
  317. "INSERT INTO Kick (userid, username, moderatorname, reason) VALUES (%s, %s, %s, %s)",
  318. (int(user.id), str(user), str(ctx.author), reason)
  319. )
  320. conn.commit()
  321. except discord.Forbidden:
  322. await ctx.respond("Error: I don't have permission to kick this user.", ephemeral=True)
  323. except discord.HTTPException as e:
  324. await ctx.respond(f"Error: Could not kick User {user.mention}. Reason: {e}", ephemeral=True)
  325. except Exception as e:
  326. await ctx.respond(f"Unexpected error: {e}", ephemeral=True)
  327. #---------------------------------#
  328. #---------------------------------#
  329. #Warn
  330. @bot.slash_command(name="warn", description="Warn a user from this Server")
  331. async def warn(
  332. ctx,
  333. user: Option(discord.User, required=True), # type: ignore
  334. reason: Option(str, default="No reason provided") # type: ignore
  335. ):
  336. await ctx.defer(ephemeral=True)
  337. if not ctx.author.guild_permissions.kick_members:
  338. await ctx.followup.send("No permission.", ephemeral=True)
  339. return
  340. if user in (bot.user, ctx.author):
  341. await ctx.followup.send("Invalid target.", ephemeral=True)
  342. return
  343. cursor.execute(
  344. "INSERT INTO Warns (userid, username, moderatorname, reason) VALUES (%s, %s, %s, %s)",
  345. (user.id, str(user), str(ctx.author), reason)
  346. )
  347. conn.commit()
  348. await ctx.followup.send(
  349. f"User {user.mention} has been warned for: {reason}",
  350. ephemeral=True
  351. )
  352. #---------------------------------#
  353. #Modinfo
  354. @bot.slash_command(name="modinfo", description="Shows the moderative history of a user from this Server")
  355. async def modinfo(
  356. ctx,
  357. user: Option(discord.User, required=True) # type: ignore
  358. ):
  359. await ctx.defer(ephemeral=False)
  360. if not ctx.author.guild_permissions.kick_members:
  361. await ctx.followup.send("No permission.", ephemeral=True)
  362. return
  363. embed = discord.Embed(
  364. title=f"__Moderation History for {user.name}__",
  365. color=discord.Color.orange()
  366. )
  367. cursor.execute(
  368. "SELECT moderatorname, reason, date FROM Warns WHERE userid = %s",
  369. (user.id,)
  370. )
  371. warns = cursor.fetchall()
  372. if warns:
  373. for moderatorname, reason, date in warns:
  374. embed.add_field(
  375. name=f"Warned by {moderatorname} on {date.strftime('%Y-%m-%d %H:%M:%S')}",
  376. value=f"Reason: {reason}",
  377. inline=False
  378. )
  379. cursor.execute(
  380. "SELECT moderatorname, reason, date FROM Kick WHERE userid = %s",
  381. (user.id,)
  382. )
  383. kicks = cursor.fetchall()
  384. if kicks:
  385. for moderatorname, reason, date in kicks:
  386. embed.add_field(
  387. name=f"Kicked by {moderatorname} on {date.strftime('%Y-%m-%d %H:%M:%S')}",
  388. value=f"Reason: {reason}",
  389. inline=False
  390. )
  391. cursor.execute(
  392. "SELECT moderatorname, reason, date FROM Bans WHERE userid = %s",
  393. (user.id,)
  394. )
  395. bans = cursor.fetchall()
  396. if bans:
  397. for moderatorname, reason, date in bans:
  398. embed.add_field(
  399. name=f"Banned by {moderatorname} on {date.strftime('%Y-%m-%d %H:%M:%S')}",
  400. value=f"Reason: {reason}",
  401. inline=False
  402. )
  403. cursor.execute(
  404. "SELECT moderatorname, reason, date FROM Unbans WHERE userid = %s",
  405. (user.id,)
  406. )
  407. unbans = cursor.fetchall()
  408. if unbans:
  409. for moderatorname, reason, date in unbans:
  410. embed.add_field(
  411. name=f"Unbanned by {moderatorname} on {date.strftime('%Y-%m-%d %H:%M:%S')}",
  412. value=f"Reason: {reason}",
  413. inline=False
  414. )
  415. if not warns and not kicks and not bans and not unbans:
  416. await ctx.followup.send(f"User {user.mention} has no moderation history.", ephemeral=True)
  417. return
  418. embed.set_thumbnail(url=user.display_avatar.url)
  419. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  420. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  421. await ctx.followup.send(embed=embed, ephemeral=False)
  422. #_________________________________#
  423. ## Reaction role system
  424. #---------------------------------#
  425. #reaction role verfiy
  426. class PersistentRoleView(discord.ui.View):
  427. def __init__(self):
  428. super().__init__(timeout=None)
  429. @discord.ui.button(
  430. label=label_rules,
  431. style=discord.ButtonStyle.success,
  432. emoji="✅",
  433. custom_id="persistent_view:role_verify"
  434. )
  435. async def verify_callback(self, button: discord.ui.Button, interaction: discord.Interaction):
  436. role = interaction.guild.get_role(int(role_rules))
  437. if role is None:
  438. await interaction.response.send_message("Error: The konfigured role was not found", ephemeral=True)
  439. return
  440. if role in interaction.user.roles:
  441. await interaction.user.remove_roles(role)
  442. await interaction.response.send_message(f"Rolle **{role.name}** wurde entfernt.", ephemeral=True)
  443. else:
  444. await interaction.user.add_roles(role)
  445. await interaction.response.send_message(f"Du hast die Rolle **{role.name}** erhalten!", ephemeral=True)
  446. @bot.slash_command(name="verify_message", description="Send the reactionrole message")
  447. async def setup_rr(
  448. ctx: discord.ApplicationContext,
  449. channel: discord.TextChannel,
  450. title: str,
  451. description: str
  452. ):
  453. if not ctx.author.guild_permissions.administrator:
  454. await ctx.respond("You dont have the permissions to do that..", ephemeral=True)
  455. return
  456. embed = discord.Embed(
  457. title=title,
  458. description=f"{description}\n\nViel Spass auf dem Server!",
  459. color=discord.Color.red()
  460. )
  461. embed.set_image(url="https://i.imgur.com/FoF791J.png")
  462. try:
  463. await channel.send(embed=embed, view=PersistentRoleView())
  464. await ctx.respond(f"Message was succesfully sent in {channel.mention}!", ephemeral=True)
  465. except discord.Forbidden:
  466. await ctx.respond("I dont have permissions to write in this channel", ephemeral=True)
  467. #---------------------------------#
  468. #_________________________________#
  469. #_________________________________#
  470. ## Help System
  471. #---------------------------------#
  472. #How to team
  473. @bot.slash_command(name="how_to_team", description= "Get Infos")
  474. async def how_to_team(
  475. ctx,
  476. ):
  477. server = ctx.guild
  478. embed = discord.Embed(
  479. title=f"__How to join the Team on {server.name}__",
  480. description=f"If you want to join the Serverteam open a ticket in #ticket.",
  481. color=discord.Color.yellow()
  482. )
  483. embed.set_thumbnail(url=server.icon)
  484. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  485. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  486. await ctx.respond(embed=embed)
  487. #---------------------------------#
  488. #How to start
  489. @bot.slash_command(name="how_to_start", description= "Get Infos")
  490. async def how_to_start(
  491. ctx,
  492. ):
  493. server = ctx.guild
  494. embed = discord.Embed(
  495. title=f"__How to start__",
  496. description=f"Hallo {ctx.author.mention}, um auf unserem Server spielen zu können, ließ dir zuerst das Regelwerk in in #regelwerk durch. Um einem Department beizutreten wähle in #how-to-start eine Einweisungsrolle aus. Melde dich anschließend für eine Einweisung an. **Wichtig: gehe erst krz vor der Einweisung auf den Server!**",
  497. color=discord.Color.yellow()
  498. )
  499. embed.set_thumbnail(url=server.icon)
  500. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  501. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  502. await ctx.respond(embed=embed)
  503. #---------------------------------#
  504. #Help_cache
  505. @bot.slash_command(name="help_cache", description= "Get Infos")
  506. async def help_cache(
  507. ctx,
  508. ):
  509. server = ctx.guild
  510. embed = discord.Embed(
  511. title=f"__How to clear your game cache__",
  512. description=f"Follow the follwing steps to clear your game cache:",
  513. color=discord.Color.yellow()
  514. )
  515. embed.add_field(name="Close Game", value="Close FiveM completely", inline=False)
  516. embed.add_field(name="Press keys", value="Win + R", inline=False)
  517. embed.add_field(name="Go to the folder", value="\Local\FiveM\FiveM.app\data", inline=False)
  518. embed.add_field(name="Delete the folders", value="cache, server-cache, server-cache-priv", inline=False)
  519. embed.add_field(name="Restart Game", value="Restart the game and download the resources again.", inline=False)
  520. embed.set_thumbnail(url=server.icon)
  521. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  522. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  523. await ctx.respond(embed=embed)
  524. #---------------------------------#
  525. #_________________________________#
  526. #---------------------------------#
  527. #Run function
  528. bot.run(token)
  529. #---------------------------------#