many update

This commit is contained in:
2025-05-26 20:35:50 -06:00
parent 3af77b6bea
commit 0a730be6f7
12 changed files with 608 additions and 177 deletions

View File

@ -14,8 +14,15 @@ func HandleCommand(commandName string, cooldownDuration time.Duration, handler C
return
}
// Get user information (handle both guild and DM contexts)
user, userErr := GetUser(i)
if userErr != nil {
RespondWithError(s, i, "Error getting user information: "+userErr.Error())
return
}
// Get or create user and guild profile
_, createUserError := GetOrCreateUserWithGuild(i.Member.User.ID, i.Member.User.Username, i.GuildID)
_, createUserError := GetOrCreateUserWithGuild(user.ID, user.Username, i.GuildID)
if createUserError != nil {
RespondWithError(s, i, "Error creating user profile: "+createUserError.Error())