Dreamer_1314

How to make a discord bot is aoi.js Part 1

Jul 21st, 2023 (edited)
917
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. index.js :
  2. const { AoiClient, LoadCommands } = require("aoi.js")
  3. const bot = new AoiClient({
  4.   token: "YOUR TOKEN HERE",
  5.   prefix: [
  6.     `$getVar[Prefix]`,
  7.     `<@$clientID>`
  8.   ],
  9.   events: [
  10.     "onMessage",
  11.     "onInteractionCreate"
  12.   ],
  13.   intents: [
  14.     "Guilds",
  15.     "GuildMessages",
  16.     "MessageContent",
  17.     "GuildMembers"
  18.   ]
  19. })
  20.  
  21. bot.variables(require("./handler/variables.js"))
  22.  
  23. const loader = new LoadCommands(bot)
  24. loader.load(bot.cmd, "./Commands/")
  25.  
  26. bot.readyCommand({
  27.   channel: "",
  28.   code: `$log[Ready as $userTag[$clientID]]`
  29. })
  30.  
  31. variables.js inside handler folder :
  32. module.exports = ({
  33.   "Prefix": "."
  34. })
Advertisement
Add Comment
Please, Sign In to add comment