-
Hello, I'm creating a bot that has to manipulate emotes in a discord server, and I want it to be able to delete every emote the bot has created and nothing else. I thought of getting the userId from the bot and pair it with the userId of the emote creator to determine if I should delete it or not, but I'm having problems getting both of those. For the bot's userId I have no idea how to get it, and for the emotes, the information about the creator comes as nil. I'd like to know how can I get both ids. For the bot configuration I'm doing just this: botClient, err = disgo.New(config["token"])
botClient.OpenGateway(context.TODO())
defer botClient.Close(context.TODO())
session = botClient.Rest() and I'm getting the emojis like this: emojis, err := session.GetEmojis(snowflake.MustParse(config["server_id"]))
if err != nil {
return
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can get the bot id by calling As for the empty creator there seems to be a miss named json tag. |
Beta Was this translation helpful? Give feedback.
You can get the bot id by calling
botClient.ApplicationID()
.As for the empty creator there seems to be a miss named json tag.
I just pushed a new commit to master with a fix for this
you can run
go get github.com/disgoorg/disgo@0162c70
to get thatwe will also include it in the next release