main.py 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  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. print(cogs_dir)
  118. for filename in os.listdir(cogs_dir):
  119. if filename.endswith(".py"):
  120. cog_list = os.path.splitext(filename)[0]
  121. print(cog_list)
  122. bot.load_extension(f"cogs.{cog_list}")
  123. class Admin(commands.Cog):
  124. def __init__(self, bot):
  125. self.bot = bot
  126. #------#
  127. #Print in Log if error occurs
  128. @bot.event
  129. async def on_application_command_error(ctx, error):
  130. channel = discord.utils.get(ctx.guild.channels, id=int(channel_log))
  131. if channel:
  132. await channel.send(f"Error occurred: {str(error)}")
  133. #---------------------------------#
  134. #Bot Online Console
  135. @bot.event
  136. async def on_ready():
  137. print(f"{bot.user} ist online")
  138. if bot.guilds:
  139. channel = discord.utils.get(bot.guilds[0].channels, id=int(channel_log))
  140. if channel:
  141. await channel.send(f"{bot.user} ist online")
  142. await load_extensions()
  143. bot.add_view(PersistentRoleView()) #loading reactionrole memory
  144. #---------------------------------------------------------------------------------------#
  145. #DONT Touch anything above this line, unless you know what you are doing!#
  146. #---------------------------------------------------------------------------------------#
  147. #---------------------------------#
  148. ## Greet
  149. @bot.slash_command(description="Greet a User")
  150. async def greet(ctx, user: str = Option(discord.User, "The user, you want to greet")):
  151. await ctx.respond(f"Hello {user.mention}")
  152. #---------------------------------#
  153. #---------------------------------#
  154. ## Say
  155. """@bot.slash_command(description="Let the bot send a message")
  156. async def say(
  157. ctx,
  158. text: str = Option(description="Input the text you want to send"),
  159. channel_input: discord.TextChannel = Option(description="Select the channel,where you want to send the message.")
  160. ):
  161. channel= discord.utils.get(ctx.guild.channels, id = int(channel_input[2:-1]))
  162. await channel.send(text)
  163. await ctx.respond("Message sent", ephemeral=True)"""
  164. #---------------------------------#
  165. #---------------------------------#
  166. ## Userinfo
  167. @bot.slash_command(name="userinfo", description="Show informations of a user from this server")
  168. async def userinfo(
  169. ctx,
  170. user: str = Option(discord.User, "Select User"),
  171. ):
  172. if user is None:
  173. user = ctx.author
  174. elif user not in ctx.guild.members:
  175. await ctx.respond("The selected user is not a member on this Server!", ephemeral=True)
  176. return
  177. elif user == bot.user:
  178. await ctx.respond(f"This is me - the {bot.user}", ephemeral=True)
  179. return
  180. embed = discord.Embed(
  181. title=f"Information about *{user.name}*",
  182. description=f"Here you see all details about {user.mention}",
  183. color=discord.Color.blue()
  184. )
  185. time = discord.utils.format_dt(user.created_at, "R")
  186. embed.add_field(name="Account creation date", value=time, inline=False)
  187. if len(user.roles) >= 2:
  188. embed.add_field(name="Roles", value=", ".join([role.mention for role in user.roles if role.name != "@everyone"]), inline=False)
  189. else:
  190. embed.add_field(name="Roles", value="User has no roles", inline=False)
  191. embed.add_field(name="Server join date", value=discord.utils.format_dt(user.joined_at, "R"), inline=False)
  192. embed.add_field(name="User ID", value=user.id)
  193. embed.set_thumbnail(url=user.display_avatar.url)
  194. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  195. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  196. await ctx.respond(embed=embed)
  197. #---------------------------------#
  198. #_________________________________#
  199. #BAN SYSTEM
  200. #---------------------------------#
  201. ##Ban
  202. @bot.slash_command(name="ban", description="Ban a user from this Server")
  203. async def ban(
  204. ctx,
  205. user: Option(discord.User, description = "Select User", required=True), # type: ignore
  206. reason: Option(str, description = "Reason for the ban", default="No reason provided") # type: ignore
  207. ):
  208. if not ctx.author.guild_permissions.ban_members:
  209. await ctx.respond("Error: You don't have the permission to ban Members!", ephemeral=True)
  210. return
  211. if user == bot.user:
  212. await ctx.respond("Error: I can't ban myself!", ephemeral=True)
  213. return
  214. if user == ctx.author:
  215. await ctx.respond("Error: You can't ban yourself!", ephemeral=True)
  216. return
  217. channel= discord.utils.get(ctx.guild.channels, id = int(channel_banlog))
  218. embed = discord.Embed(
  219. title=f"Ban of **{user.name}**",
  220. description=f"User {user.mention} has been banned from the Server",
  221. color=discord.Color.red()
  222. )
  223. time = discord.utils.format_dt(datetime.now(), "f")
  224. embed.add_field(name="Ban Date", value=time, inline=False)
  225. embed.add_field(name="Moderator", value=f"{ctx.author}", inline=False)
  226. embed.add_field(name="Reason", value=reason, inline=False)
  227. embed.add_field(name="User ID", value=user.id)
  228. embed.set_thumbnail(url=user.display_avatar.url)
  229. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  230. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  231. try:
  232. await ctx.guild.ban(user, reason=reason)
  233. await ctx.respond(f"User {user.mention} has been banned from this Server!", ephemeral=True)
  234. await channel.send(embed=embed)
  235. cursor.execute(
  236. "INSERT INTO Bans (userid, username, moderatorname, reason) VALUES (%s, %s, %s, %s)",
  237. (user.id, str(user), str(ctx.author), reason)
  238. )
  239. conn.commit()
  240. except discord.Forbidden:
  241. await ctx.respond("Error: I don't have permission to ban this user.", ephemeral=True)
  242. except discord.HTTPException as e:
  243. await ctx.respond(f"Error: Could not ban User {user.mention}. Reason: {e}", ephemeral=True)
  244. except Exception as e:
  245. await ctx.respond(f"Unexpected error: {e}", ephemeral=True)
  246. #---------------------------------#
  247. #Unban
  248. @bot.slash_command(name="unban", description="Unban a user from this Server")
  249. async def unban(
  250. ctx,
  251. user: Option(discord.User, description = "Insert User ID", required=True), # type: ignore
  252. reason: Option(str, description = "Reason for the unbanning", default="No reason provided") # type: ignore
  253. ):
  254. if not ctx.author.guild_permissions.ban_members:
  255. await ctx.respond("Error: You don't have the permission to unban Members!", ephemeral=True)
  256. return
  257. if user == bot.user:
  258. await ctx.respond("Error: I can't unban myself!", ephemeral=True)
  259. return
  260. if user == ctx.author:
  261. await ctx.respond("Error: You can't unban yourself!", ephemeral=True)
  262. return
  263. if user in ctx.guild.members:
  264. await ctx.respond("Error: This user is not banned!", ephemeral=True)
  265. return
  266. channel= discord.utils.get(ctx.guild.channels, id = int(channel_banlog))
  267. embed = discord.Embed(
  268. title=f"Unban of **{user.name}**",
  269. description=f"User {user.mention} was unbanned from this server.",
  270. color=discord.Color.green()
  271. )
  272. time = discord.utils.format_dt(datetime.now(), "f")
  273. embed.add_field(name="Unban Date", value=time, inline=False)
  274. embed.add_field(name="Moderator", value=f"{ctx.author}", inline=False)
  275. embed.add_field(name="Reason", value=reason, inline=False)
  276. embed.add_field(name="User ID", value=user.id)
  277. embed.set_thumbnail(url=user.display_avatar.url)
  278. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  279. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  280. try:
  281. await ctx.guild.unban(user, reason=reason)
  282. await ctx.respond(f"User {user.mention} is now unbanned!", ephemeral=True)
  283. await channel.send(embed=embed)
  284. cursor.execute(
  285. "INSERT INTO Unbans (userid, username, moderatorname, reason) VALUES (%s, %s, %s, %s)",
  286. (user.id, str(user), str(ctx.author), reason)
  287. )
  288. conn.commit()
  289. except discord.Forbidden:
  290. await ctx.respond("Error: I don't have permission to unban this user.", ephemeral=True)
  291. except discord.HTTPException as e:
  292. await ctx.respond(f"Error: Could not unban User {user.mention}. Reason: {e}", ephemeral=True)
  293. except Exception as e:
  294. await ctx.respond(f"Unexpected error: {e}", ephemeral=True)
  295. #---------------------------------#
  296. #_________________________________#
  297. #---------------------------------#
  298. #Kick
  299. @bot.slash_command(name="kick", description="Kick a user from this Server")
  300. async def kick(
  301. ctx,
  302. user: Option(discord.User, description = "Select User", required=True), # type: ignore
  303. reason: Option(str, description = "Reason for the ban", default="No reason provided") # type: ignore
  304. ):
  305. if not ctx.author.guild_permissions.kick_members:
  306. await ctx.respond("Error: You don't have the permission to kick Members!", ephemeral=True)
  307. return
  308. if user == bot.user:
  309. await ctx.respond("Error: I can't kick myself!", ephemeral=True)
  310. return
  311. if user == ctx.author:
  312. await ctx.respond("Error: You can't kick yourself!", ephemeral=True)
  313. return
  314. try:
  315. await ctx.guild.kick(user, reason=reason)
  316. await ctx.respond(f"User {user.mention} has been kicked from this Server!", ephemeral=True)
  317. cursor.execute(
  318. "INSERT INTO Kick (userid, username, moderatorname, reason) VALUES (%s, %s, %s, %s)",
  319. (int(user.id), str(user), str(ctx.author), reason)
  320. )
  321. conn.commit()
  322. except discord.Forbidden:
  323. await ctx.respond("Error: I don't have permission to kick this user.", ephemeral=True)
  324. except discord.HTTPException as e:
  325. await ctx.respond(f"Error: Could not kick User {user.mention}. Reason: {e}", ephemeral=True)
  326. except Exception as e:
  327. await ctx.respond(f"Unexpected error: {e}", ephemeral=True)
  328. #---------------------------------#
  329. #---------------------------------#
  330. #Warn
  331. @bot.slash_command(name="warn", description="Warn a user from this Server")
  332. async def warn(
  333. ctx,
  334. user: Option(discord.User, required=True), # type: ignore
  335. reason: Option(str, default="No reason provided") # type: ignore
  336. ):
  337. await ctx.defer(ephemeral=True)
  338. if not ctx.author.guild_permissions.kick_members:
  339. await ctx.followup.send("No permission.", ephemeral=True)
  340. return
  341. if user in (bot.user, ctx.author):
  342. await ctx.followup.send("Invalid target.", ephemeral=True)
  343. return
  344. cursor.execute(
  345. "INSERT INTO Warns (userid, username, moderatorname, reason) VALUES (%s, %s, %s, %s)",
  346. (user.id, str(user), str(ctx.author), reason)
  347. )
  348. conn.commit()
  349. await ctx.followup.send(
  350. f"User {user.mention} has been warned for: {reason}",
  351. ephemeral=True
  352. )
  353. #---------------------------------#
  354. #Modinfo
  355. @bot.slash_command(name="modinfo", description="Shows the moderative history of a user from this Server")
  356. async def modinfo(
  357. ctx,
  358. user: Option(discord.User, required=True) # type: ignore
  359. ):
  360. await ctx.defer(ephemeral=False)
  361. if not ctx.author.guild_permissions.kick_members:
  362. await ctx.followup.send("No permission.", ephemeral=True)
  363. return
  364. embed = discord.Embed(
  365. title=f"__Moderation History for {user.name}__",
  366. color=discord.Color.orange()
  367. )
  368. cursor.execute(
  369. "SELECT moderatorname, reason, date FROM Warns WHERE userid = %s",
  370. (user.id,)
  371. )
  372. warns = cursor.fetchall()
  373. if warns:
  374. for moderatorname, reason, date in warns:
  375. embed.add_field(
  376. name=f"Warned by {moderatorname} on {date.strftime('%Y-%m-%d %H:%M:%S')}",
  377. value=f"Reason: {reason}",
  378. inline=False
  379. )
  380. cursor.execute(
  381. "SELECT moderatorname, reason, date FROM Kick WHERE userid = %s",
  382. (user.id,)
  383. )
  384. kicks = cursor.fetchall()
  385. if kicks:
  386. for moderatorname, reason, date in kicks:
  387. embed.add_field(
  388. name=f"Kicked by {moderatorname} on {date.strftime('%Y-%m-%d %H:%M:%S')}",
  389. value=f"Reason: {reason}",
  390. inline=False
  391. )
  392. cursor.execute(
  393. "SELECT moderatorname, reason, date FROM Bans WHERE userid = %s",
  394. (user.id,)
  395. )
  396. bans = cursor.fetchall()
  397. if bans:
  398. for moderatorname, reason, date in bans:
  399. embed.add_field(
  400. name=f"Banned by {moderatorname} on {date.strftime('%Y-%m-%d %H:%M:%S')}",
  401. value=f"Reason: {reason}",
  402. inline=False
  403. )
  404. cursor.execute(
  405. "SELECT moderatorname, reason, date FROM Unbans WHERE userid = %s",
  406. (user.id,)
  407. )
  408. unbans = cursor.fetchall()
  409. if unbans:
  410. for moderatorname, reason, date in unbans:
  411. embed.add_field(
  412. name=f"Unbanned by {moderatorname} on {date.strftime('%Y-%m-%d %H:%M:%S')}",
  413. value=f"Reason: {reason}",
  414. inline=False
  415. )
  416. if not warns and not kicks and not bans and not unbans:
  417. await ctx.followup.send(f"User {user.mention} has no moderation history.", ephemeral=True)
  418. return
  419. embed.set_thumbnail(url=user.display_avatar.url)
  420. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  421. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  422. await ctx.followup.send(embed=embed, ephemeral=False)
  423. #_________________________________#
  424. ## Reaction role system
  425. #---------------------------------#
  426. #reaction role verfiy
  427. class PersistentRoleView(discord.ui.View):
  428. def __init__(self):
  429. super().__init__(timeout=None)
  430. @discord.ui.button(
  431. label=label_rules,
  432. style=discord.ButtonStyle.success,
  433. emoji="✅",
  434. custom_id="persistent_view:role_verify"
  435. )
  436. async def verify_callback(self, button: discord.ui.Button, interaction: discord.Interaction):
  437. role = interaction.guild.get_role(int(role_rules))
  438. if role is None:
  439. await interaction.response.send_message("Error: The konfigured role was not found", ephemeral=True)
  440. return
  441. if role in interaction.user.roles:
  442. await interaction.user.remove_roles(role)
  443. await interaction.response.send_message(f"Rolle **{role.name}** wurde entfernt.", ephemeral=True)
  444. else:
  445. await interaction.user.add_roles(role)
  446. await interaction.response.send_message(f"Du hast die Rolle **{role.name}** erhalten!", ephemeral=True)
  447. @bot.slash_command(name="verify_message", description="Send the reactionrole message")
  448. async def setup_rr(
  449. ctx: discord.ApplicationContext,
  450. channel: discord.TextChannel,
  451. title: str,
  452. description: str
  453. ):
  454. if not ctx.author.guild_permissions.administrator:
  455. await ctx.respond("You dont have the permissions to do that..", ephemeral=True)
  456. return
  457. embed = discord.Embed(
  458. title=title,
  459. description=f"{description}\n\nViel Spass auf dem Server!",
  460. color=discord.Color.red()
  461. )
  462. embed.set_image(url="https://i.imgur.com/FoF791J.png")
  463. try:
  464. await channel.send(embed=embed, view=PersistentRoleView())
  465. await ctx.respond(f"Message was succesfully sent in {channel.mention}!", ephemeral=True)
  466. except discord.Forbidden:
  467. await ctx.respond("I dont have permissions to write in this channel", ephemeral=True)
  468. #---------------------------------#
  469. #_________________________________#
  470. #_________________________________#
  471. ## Help System
  472. #---------------------------------#
  473. #How to team
  474. @bot.slash_command(name="how_to_team", description= "Get Infos")
  475. async def how_to_team(
  476. ctx,
  477. ):
  478. server = ctx.guild
  479. embed = discord.Embed(
  480. title=f"__How to join the Team on {server.name}__",
  481. description=f"If you want to join the Serverteam open a ticket in #ticket.",
  482. color=discord.Color.yellow()
  483. )
  484. embed.set_thumbnail(url=server.icon)
  485. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  486. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  487. await ctx.respond(embed=embed)
  488. #---------------------------------#
  489. #How to start
  490. @bot.slash_command(name="how_to_start", description= "Get Infos")
  491. async def how_to_start(
  492. ctx,
  493. ):
  494. server = ctx.guild
  495. embed = discord.Embed(
  496. title=f"__How to start__",
  497. 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!**",
  498. color=discord.Color.yellow()
  499. )
  500. embed.set_thumbnail(url=server.icon)
  501. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  502. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  503. await ctx.respond(embed=embed)
  504. #---------------------------------#
  505. #Help_cache
  506. @bot.slash_command(name="help_cache", description= "Get Infos")
  507. async def help_cache(
  508. ctx,
  509. ):
  510. server = ctx.guild
  511. embed = discord.Embed(
  512. title=f"__How to clear your game cache__",
  513. description=f"Follow the follwing steps to clear your game cache:",
  514. color=discord.Color.yellow()
  515. )
  516. embed.add_field(name="Close Game", value="Close FiveM completely", inline=False)
  517. embed.add_field(name="Press keys", value="Win + R", inline=False)
  518. embed.add_field(name="Go to the folder", value="\Local\FiveM\FiveM.app\data", inline=False)
  519. embed.add_field(name="Delete the folders", value="cache, server-cache, server-cache-priv", inline=False)
  520. embed.add_field(name="Restart Game", value="Restart the game and download the resources again.", inline=False)
  521. embed.set_thumbnail(url=server.icon)
  522. embed.set_author(name="VicePD", icon_url="https://i.imgur.com/6QteFrg.png")
  523. embed.set_footer(text="VicePD - Bot | Made by BaumSplitter41")
  524. await ctx.respond(embed=embed)
  525. #---------------------------------#
  526. #_________________________________#
  527. #---------------------------------#
  528. #Run function
  529. bot.run(token)
  530. #---------------------------------#