Developer
Config. & Const. Setup
Setting up Constants

Setting up Constants

In this section we will set our necessary const. so lets begin.

Project Structure

First, create a folder named constants inside the src directory. Inside this constants folder, create a file named botConst.ts. This files will hold the constants for your project.

  • Adding Colors

    Now we will add our colors for our app, this are the default colors for our app.

    In the botConst.ts file, we will add our colors:

    src/constants/botConst.ts
    import { ColorResolvable } from 'discord.js'
     
    export const COLORS: { [key: string]: ColorResolvable } = {
      red: '#ff3b30',
      orange: '#ff9500',
      yellow: '#ffcc00',
      green: '#34c759',
      mint: '#00c7be',
      teal: '#30b0c7',
      cyan: '#32ade6',
      blue: '#007aff',
      indigo: '#5856d6',
      purple: '#af52de',
      pink: '#ff2d55',
      brown: '#a2845e',
      lightGray: '#aeaeb2',
      lightGrayMid: '#3a3a3c',
      grayMid: '#2c2c2e',
      darkGray: '#1c1c1e',
    } as const

    Done, now lets add emojis.

    Adding Emojis

    Now we will add our emojis, in the same file i.e botConst.ts add the emoji constants also:

    🚫

    Listen carefully: These emojis are specially created by nsCore Developers for the nsCore app. These emojis follow the color theme of the above colors. We highly suggest you use the same emojis that nsCore uses.

    src/constants/botConst.ts
    export const EMOJIS = {
      success: '<:success:1242828455964315750>',
      failed: '<:failed:1242828548297719898>',
      caution: '<:caution:1242828667718209637>',
      info: '<:info:1242828626311774320>',
      seen: '<:seen:1242828705768935575>',
      slash: '<:slash:1242828744171982900>',
      ts: '<:ts:1244152291364176002>',
      js: '<:js:1244152318207856672>',
      apps: '<:apps:1244153325075697724>',
      link: '<:links:1244153412199649300>',
      devlopers: '<:developers:1244271269701091480>',
      github: '<:github:1244270608754278463>',
      leaf: '<:leaf:1244270440701100093>',
      sparkles: '<:pearls:1244270698080501770>',
      sparklesd: '<:pearlsd:1244270768599339028>',
      vscode: '<:vscode:1244270888757629111>',
      bugs: '<:bugs:1244270990620627034>',
      message: '<:message:1244271071511838801>',
      id: '<:id:1244271770618564740>',
      inbox: '<:inbox:1244271719003193424>',
      colors: '<:colors:1244271646278422649>',
      members: '<:members:1244271591785758801>',
      home: '<:home:1244271538849579058>',
      globe: '<:globe:1244271487112970291>',
      creators: '<:creators:1244271212582928404>',
      heat: '<:heat:1244316740330979360>',
      permissions: '<:permissions:1244316852562427934>',
      tips: '<:tips:1244316790922678414>',
      username: '<:username:1244531006711664712>',
      server: '<:serverd:1244600141835403345>',
      channel: '<:channel:1244649126788988929>',
      badges: '<:badges:1244649060015673356>',
      seo: '<:seo:1244532163484057700>',
      crown: '<:crown:1244600088492507218>',
      fun: '<:fun:1244650971389235293>',
      roles: '<:roles:1244994437071896714>',
      al: '<:al:1245751475532070922>',
      ar: '<:ar:1245751409014472735>',
    } as const
    💡

    You can use your own emojis, and if you wanted to use nsCore emojis, then contact with them in their server, here is the link (opens in a new tab).

    successfully completed our constant section also, Now we can move ahead.