Enable the ‘Developer mode’ feature within your Discord account settings. Select the Discord API option. In the Developer portal, from there, choose ‘Applications’. Create a name for your bot and then click Create. Access the Bot menu and generate a token by selecting Add Bot. Utilize the provided bot token to program your bot, and remember to save the file containing the code.