toowake

Games Command With Hyper Links (Steam, Epic Games, Game Website)

Apr 1st, 2023
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.10 KB | None | 0 0
  1. const { SlashCommandBuilder, EmbedBuilder} = require("discord.js");
  2.  
  3. module.exports = {
  4. data: new SlashCommandBuilder()
  5. .setName("game")
  6. .setDescription("get a random game")
  7. .addStringOption(option => option
  8. .setName("category")
  9. .setDescription("the category")
  10. .addChoices(
  11. {name: "FPS", value: "FPS"},
  12. {name: "Shooter", value: "Shooter"},
  13. {name: "Arcade", value: "Arcade"},
  14. {name: "Rythm", value: "Rythm"},
  15. {name: "Action", value: "Action"},
  16. {name: "Racing", value: "Racing"},
  17. {name: "Military", value: "Military"},
  18. {name: "Adventure", value: "Adventure"},
  19. )
  20. .setRequired(true)
  21. ),
  22.  
  23. async execute (interaction) {
  24. const Rythm = [
  25. "[Fuser](https://store.steampowered.com/app/1331440/FUSER/)",
  26. "[AVICII Invector](https://store.steampowered.com/app/986800/AVICII_Invector/)",
  27. "[Ragnarock](https://store.steampowered.com/app/1345820/Ragnarock/)",
  28. "[Friday Night Funkin](https://de.crazygames.com/spiele/friday-night-funkin?utm_source=google&utm_medium=cpc&utm_campaign=google-serach-de&ad_group=135927663509&gclid=CjwKCAjwrJ-hBhB7EiwAuyBVXXq1ga9xFFhO5XZ3jhw4-bJXsKRJj_VmO9ukQvVhlWX96CH40IwLCBoCToAQAvD_BwE)",
  29. "[Just Dance](https://store.steampowered.com/app/446560/Just_Dance_2017/)",
  30. "[Thumper](https://store.steampowered.com/app/356400/Thumper/)",
  31. "[Guitar Hero 3: Legends Of Rock](https://www.amazon.de/dp/B001RB25MM?tag=4players_coco_none-21&linkCode=osi&th=1&psc=1)",
  32. "[Crypt Of The NecroDancer](https://store.steampowered.com/app/247080/Crypt_of_the_NecroDancer/)",
  33. "[Pistol Whip](https://store.steampowered.com/app/1079800/Pistol_Whip/)",
  34. "[Beat Saber](https://store.steampowered.com/app/620980/Beat_Saber/)",
  35. "[OSU!](https://osu.ppy.sh/home/download)",
  36. "[Mushe Dash](https://store.steampowered.com/app/774171/Muse_Dash/)"
  37. ];
  38. const FPS = [
  39. "[Halo Infinite](https://store.steampowered.com/app/1240440/Halo_Infinite/)",
  40. "[Call of Duty MW2](https://store.steampowered.com/app/1938090/Call_of_Duty_Modern_Warfare_II/)",
  41. "[Warzone 2](https://store.steampowered.com/app/1962663/Call_of_Duty_Warzone_20/)",
  42. "[Quake 2021](https://store.steampowered.com/app/2310/Quake/)",
  43. "[Black Mesa](https://store.steampowered.com/app/362890/Black_Mesa/)",
  44. "[Doom Eternal](https://store.steampowered.com/app/782330/DOOM_Eternal/)",
  45. "[Overwatch 2](https://overwatch.blizzard.com)",
  46. "[CS:GO](https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/)",
  47. "[Half Life 2](https://store.steampowered.com/app/220/HalfLife_2/)",
  48. "[Escape from tarkov](https://www.escapefromtarkov.com)",
  49. "[Titanfall 2](https://store.steampowered.com/app/1237970/Titanfall_2/)",
  50. "[Left 4 dead 2](https://store.steampowered.com/app/550/Left_4_Dead_2/)",
  51. "[Team Fortess 2](https://store.steampowered.com/app/440/Team_Fortress_2/)",
  52. "[Valorant](https://playvalorant.com)",
  53. "[Unreal Tournament](https://www.epicgames.com/unrealtournament/en-US/)"
  54. ];
  55. const Arcade = [
  56. "[Dead Cells 2](https://store.steampowered.com/app/588650/Dead_Cells/)",
  57. "[NUTS](https://store.steampowered.com/app/768450/NUTS/)",
  58. "[Assemble with care](https://store.steampowered.com/app/1202900/Assemble_with_Care/)",
  59. "[Monster Hunter Strory +](https://store.steampowered.com/app/1277400/Monster_Hunter_Stories_2_Wings_of_Ruin/)",
  60. "[Card of Darkness](https://www.cardofdarkness.com)",
  61. "[Survival Z](https://store.steampowered.com/app/799500/SurvivalZ/)"
  62. ];
  63. const Shooter = [
  64. "[Apex Legends](https://store.steampowered.com/app/1172470/Apex_Legends/)",
  65. "[Call of Duty MW2](https://store.steampowered.com/app/1938090/Call_of_Duty_Modern_Warfare_II/)2",
  66. "[CS:GO](https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/)",
  67. "[Destiny 2](https://store.steampowered.com/app/1085660/Destiny_2/)",
  68. "[Fortnite](https://launcher.store.epicgames.com/de/)",
  69. "[PUBG](https://store.steampowered.com/app/578080/PUBG_BATTLEGROUNDS/)",
  70. "[Valorant](https://playvalorant.com)",
  71. "[Overwatch 2](https://overwatch.blizzard.com)",
  72. "[Battlefield 2042](https://store.steampowered.com/app/1517290/Battlefield_2042/)",
  73. ];
  74. const Military = [
  75. "[Hell let loose](https://store.steampowered.com/app/686810/Hell_Let_Loose/)",
  76. "[Pavlov VR](https://store.steampowered.com/app/555160/Pavlov_VR/)",
  77. "[ARMA 3](https://store.steampowered.com/app/107410/Arma_3/)",
  78. "[Sniper: Ghost Warrior Contracts 2](https://store.steampowered.com/app/1338770/Sniper_Ghost_Warrior_Contracts_2/)",
  79. "[Squad](https://store.steampowered.com/app/393380/Squad/)",
  80. "[Enlisted](enlisted.ne)",
  81. "[Call of Duty: Vanguard](https://www.callofduty.com/en/vanguard)",
  82. "[Defcon](https://store.steampowered.com/app/1520/DEFCON/)",
  83. "[Tannenberg](https://store.steampowered.com/app/633460/Tannenberg/)",
  84. "[WARNO](https://store.steampowered.com/app/1611600/WARNO/)"
  85. ];
  86. const Action = [
  87. "[Dead Cells 2](https://store.steampowered.com/app/588650/Dead_Cells/)",
  88. "[Sekiro: Shadows Die Twice](https://store.steampowered.com/app/814380/Sekiro_Shadows_Die_Twice__GOTY_Edition/)",
  89. "[Bayonetta](https://www.nintendo.com/store/products/bayonetta-3-switch/)",
  90. "[Batman Arkham City](https://store.steampowered.com/app/200260/Batman_Arkham_City__Game_of_the_Year_Edition/)",
  91. "[Hotline Miami](https://store.steampowered.com/app/219150/Hotline_Miami/)",
  92. "[Devil May Cry 5](https://store.steampowered.com/app/601150/Devil_May_Cry_5/)",
  93. "[Monster Hunter World](https://store.steampowered.com/app/582010/Monster_Hunter_World/)",
  94. "[Vanquish](https://store.steampowered.com/app/460810/Vanquish/)",
  95. "[Resident Evil 2 2019](https://store.steampowered.com/app/883710/Resident_Evil_2/)",
  96. "[TowerFall: Ascension](https://store.steampowered.com/app/251470/TowerFall_Ascension/)"
  97. ];
  98. const Racing = [
  99. "[Forza Horizon 5](https://store.steampowered.com/app/1551360/Forza_Horizon_5/)",
  100. "[Dirt Rally 2](https://store.steampowered.com/app/690790/DiRT_Rally_20/)",
  101. "[Shift 2](https://store.steampowered.com/app/47920/Shift_2_Unleashed/)",
  102. "[Art of Rally](https://store.steampowered.com/app/550320/art_of_rally/)",
  103. "[Project Cars 2](https://store.steampowered.com/app/860233/Sim_Racing_Telemetry__Project_Cars_2/)",
  104. "[Wreckfest](https://store.steampowered.com/app/228380/Wreckfest/)",
  105. "[Trackmania](https://www.trackmania.com)"
  106. ];
  107. const Adventure = [
  108. "[The walking dead](https://store.steampowered.com/app/207610/The_Walking_Dead/)",
  109. "[Chuchel](https://store.steampowered.com/app/711660/CHUCHEL/)",
  110. "[Broken Sword](https://store.steampowered.com/app/57640/Broken_Sword_Directors_Cut/)",
  111. "[Return to monkey island](https://store.steampowered.com/app/2060130/Return_to_Monkey_Island/)"
  112. ];
  113.  
  114. const Category = interaction.options.getString("category");
  115.  
  116. if (Category === "Rythm") {
  117. const choices = Math.floor(Math.random() * Rythm.length);
  118. const name = `${Rythm[choices]}`;
  119.  
  120. const embed = new EmbedBuilder()
  121. .setTitle(`Game for category: ${Category}`)
  122. .setColor("Green")
  123. .addFields(
  124. {name: "Game", value: `${name}`, inline: true},
  125. {name: "Requested by:", value: `<@${interaction.user.id}>`, inline: true}
  126. )
  127.  
  128. return interaction.reply({
  129. embeds: [embed]
  130. });
  131. }
  132.  
  133. if (Category === "FPS") {
  134. const choices = Math.floor(Math.random() * FPS.length);
  135.  
  136. const embed = new EmbedBuilder()
  137. .setTitle(`Game for category: ${Category}`)
  138. .setColor("Green")
  139. .addFields(
  140. {name: "Game", value: `${FPS[choices]}`, inline: true},
  141. {name: "Requested by:", value: `<@${interaction.user.id}>`, inline: true}
  142. )
  143.  
  144. return interaction.reply({
  145. embeds: [embed]
  146. });
  147. }
  148.  
  149. if (Category === "Arcade") {
  150. const choices = Math.floor(Math.random() * Arcade.length);
  151.  
  152. const embed = new EmbedBuilder()
  153. .setTitle(`Game for category: ${Category}`)
  154. .setColor("Green")
  155. .addFields(
  156. {name: "Game", value: `${FPS[choices]}`, inline: true},
  157. {name: "Requested by:", value: `<@${interaction.user.id}>`, inline: true}
  158. )
  159.  
  160. return interaction.reply({
  161. embeds: [embed]
  162. });
  163. }
  164.  
  165.  
  166. if (Category === "Shooter") {
  167. const choices = Math.floor(Math.random() * Shooter.length);
  168.  
  169. const embed = new EmbedBuilder()
  170. .setTitle(`Game for category: ${Category}`)
  171. .setColor("Green")
  172. .addFields(
  173. {name: "Game", value: `${Shooter[choices]}`, inline: true},
  174. {name: "Requested by:", value: `<@${interaction.user.id}>`, inline: true}
  175. )
  176.  
  177. return interaction.reply({
  178. embeds: [embed]
  179. });
  180. }
  181.  
  182. if (Category === "Military") {
  183. const choices = Math.floor(Math.random() * Military.length);
  184.  
  185. const embed = new EmbedBuilder()
  186. .setTitle(`Game for category: ${Category}`)
  187. .setColor("Green")
  188. .addFields(
  189. {name: "Game", value: `${Military[choices]}`, inline: true},
  190. {name: "Requested by:",value: `<@${interaction.user.id}>`, inline: true}
  191. )
  192.  
  193. return interaction.reply({
  194. embeds: [embed]
  195. });
  196. }
  197.  
  198. if (Category === "Action") {
  199. const choices = Math.floor(Math.random() * Action.length);
  200.  
  201. const embed = new EmbedBuilder()
  202. .setTitle(`Game for category: ${Category}`)
  203. .setColor("Green")
  204. .addFields(
  205. {name: "Game", value: `${Action[choices]}`, inline: true},
  206. {name: "Requested by:", value: `<@${interaction.user.id}>`, inline: true}
  207. )
  208.  
  209. return interaction.reply({
  210. embeds: [embed]
  211. });
  212. }
  213.  
  214. if (Category === "Racing") {
  215. const choices = Math.floor(Math.random() * Racing.length);
  216.  
  217. const embed = new EmbedBuilder()
  218. .setTitle(`Game for category: ${Category}`)
  219. .setColor("Green")
  220. .addFields(
  221. {name: "Game", value: `${Action[choices]}`, inline: true},
  222. {name: "Requested by:", value: `<@${interaction.user.id}>`, inline: true}
  223. )
  224.  
  225. return interaction.reply({
  226. embeds: [embed]
  227. });
  228. }
  229.  
  230. if (Category === "Adventure") {
  231. const choices = Math.floor(Math.random() * Adventure.length);
  232.  
  233. const embed = new EmbedBuilder()
  234. .setTitle(`Game for category: ${Category}`)
  235. .setColor("Green")
  236. .addFields(
  237. {name: "Game", value: `${Adventure[choices]}`, inline: true},
  238. {name: "Requested by:", value: `<@${interaction.user.id}>`, inline: true}
  239. )
  240.  
  241. return interaction.reply({
  242. embeds: [embed]
  243. });
  244. }
  245.  
  246.  
  247. }
  248. }
Advertisement
Add Comment
Please, Sign In to add comment