main.py 21 KB

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