Advertisement
gaber-elsayed

bug

Oct 9th, 2021
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. const discord = require("discord.js");
  2. module.exports = {
  3. name: "bug",
  4. category: "moderation",
  5. args: true,
  6. description:
  7. "Please specify the bug. Example:\n`punch isn't working. It isn't mentioning the user I'm trying to punch`",
  8. usage:
  9. "Please specify the bug. Example:\n`punch isn't working. It isn't mentioning the user I'm trying to punch`",
  10. run: async (client, message, args) => {
  11. // again make this fit your command handler style 😀
  12. args = args.join(" ");
  13. const channels = message.channel;
  14. let check;
  15. if (args[0] === "temp") {
  16. check = "true";
  17. } else if (args[1] === "temp") {
  18. check = "true";
  19. } else {
  20. check = "false";
  21. }
  22. let check2;
  23. if (args[0] === "temp") {
  24. check2 = "86400";
  25. } else if (args[1] === "temp") {
  26. check2 = "86400";
  27. } else {
  28. check2 = "0";
  29. }
  30. message.reply(
  31. "Thanks for submitting a bug!, we will check your report\nwe will DM you when this bug is resolved\nplease also activate DM permissions all"
  32. );
  33. channels
  34. .createInvite({
  35. temporary: `${check}`,
  36. maxAge: `${check2}`,
  37. maxUses: 0,
  38. reason: `Requested By : ${message.author.username}`
  39. })
  40. .then(InviteCode =>
  41. client.channels.cache.get("834825028444618773").send(
  42. new discord.MessageEmbed()
  43. .setTitle("New Report Bug")
  44. .addField(
  45. "User Name",
  46. `**${message.author.username}#${message.author.discriminator}**`
  47. )
  48. .addField("ID User", message.author.id)
  49. .addField("Reported", args)
  50. .addField("Server Name", `**${message.guild.name}**`)
  51. .addField("ID Server", `**${message.guild.id}**`)
  52. .addField("USER SEARCH", `**[Click Here](https://discordapp.com/users/${message.guild.id}/)**`)
  53. .addField(`Link Server`, `https://discord.gg/${InviteCode.code}`)
  54. .setColor("RANDOM")
  55. )
  56. );
  57. }
  58. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement