Skip to content

Commit

Permalink
on bot ready, update channel name async
Browse files Browse the repository at this point in the history
  • Loading branch information
Distortions81 committed Nov 23, 2024
1 parent 1710711 commit 2432bb3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,12 @@ func BotReady(s *discordgo.Session, r *discordgo.Ready) {
s.AddHandler(handleDiscordMessages)
s.AddHandler(commands.SlashCommand)

/* Update the string for the channel name and topic */
fact.UpdateChannelName()
/* Send the new string to discord */
fact.DoUpdateChannelName()
go func() {
/* Update the string for the channel name and topic */
fact.UpdateChannelName()
/* Send the new string to discord */
fact.DoUpdateChannelName()
}()

cwlog.DoLogCW("Discord bot ready.")

Expand Down

0 comments on commit 2432bb3

Please sign in to comment.