Skip to content
Adding a prefix
Profile icon
GracioussBoww

Im trying to add a prefix to my bot in which I keep getting an error message of the one below, if anyone can help me figure this out it'd be greatly appreciated.

image

You are viewing a single comment. View All
Profile icon
WWEMONSTERMONST

As you have your prefix in json file, you have to import it from there. It can be done by using following code:

const { prefix } = require('./name.json') // Or you can use this const items = require('./name.json') const prefix = items.prefix
Profile icon
GracioussBoww

@WWEMONSTERMONST

Thank you ever so much for helping me there, it worked