mirror of
https://github.com/idanoo/GoDiscMoji
synced 2025-07-05 04:02:14 +00:00
Ignore dyno user ID
This commit is contained in:
parent
3ab4884286
commit
d0fd6b2d8d
1 changed files with 7 additions and 0 deletions
|
@ -9,6 +9,8 @@ import (
|
||||||
"github.com/idanoo/GoDiscMoji/internal/db"
|
"github.com/idanoo/GoDiscMoji/internal/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const dynoUserID = "1335855288439541802"
|
||||||
|
|
||||||
var b *Bot
|
var b *Bot
|
||||||
|
|
||||||
type Bot struct {
|
type Bot struct {
|
||||||
|
@ -79,6 +81,11 @@ func (bot *Bot) Start() error {
|
||||||
|
|
||||||
// HandleReaction - Simply log it
|
// HandleReaction - Simply log it
|
||||||
func (bot *Bot) HandleReaction(discord *discordgo.Session, reaction *discordgo.MessageReactionAdd) {
|
func (bot *Bot) HandleReaction(discord *discordgo.Session, reaction *discordgo.MessageReactionAdd) {
|
||||||
|
// Ignore Dyno user
|
||||||
|
if reaction.UserID == dynoUserID {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
err := bot.Db.LogEmojiUsage(reaction.GuildID, reaction.ChannelID, reaction.UserID, reaction.Emoji.Name)
|
err := bot.Db.LogEmojiUsage(reaction.GuildID, reaction.ChannelID, reaction.UserID, reaction.Emoji.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("Failed to log emoji usage", "err", err)
|
slog.Error("Failed to log emoji usage", "err", err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue