auth-bot

Discord Bot to verify user, allowing server owner to recover server by pulling back members
git clone https://codeberg.org/night0721/auth-bot
Log | Files | Refs | README | LICENSE

Client.js (1144B)


      1 const {
      2   Client,
      3   Collection,
      4   EmbedBuilder,
      5   GatewayIntentBits,
      6   Partials,
      7 } = require("discord.js");
      8 require("dotenv").config();
      9 
     10 class Auth extends Client {
     11   /**
     12    * @param {Client.options} options
     13    */
     14   constructor(
     15     options = {
     16       shards: "auto",
     17       partials: [
     18         Partials.Message,
     19         Partials.Channel,
     20         Partials.Reaction,
     21         Partials.GuildMember,
     22       ],
     23       intents: [
     24         GatewayIntentBits.Guilds,
     25         GatewayIntentBits.GuildMessages,
     26         GatewayIntentBits.GuildMembers,
     27       ],
     28     }
     29   ) {
     30     super(options);
     31     this.slashCommands = new Collection();
     32   }
     33 
     34   start() {
     35     require("../handler")(this);
     36     this.login(process.env.TOKEN);
     37     console.log("Bot Started");
     38   }
     39   err(c, e) {
     40     const embed = new EmbedBuilder()
     41       .setTitle("An Error Occured")
     42       .setColor("Red")
     43       .setDescription(`❌ | ${e}`)
     44       .setTimestamp()
     45       .setFooter({
     46         text: `Made by ${this.author}`,
     47         iconURL: this.user.displayAvatarURL(),
     48       });
     49     c.followUp({ embeds: [embed] });
     50   }
     51 }
     52 
     53 module.exports = Auth;