diff --git a/pkg/bouncerbot/bouncerbot.go b/pkg/bouncerbot/bouncerbot.go index d0efad8..e6f3638 100644 --- a/pkg/bouncerbot/bouncerbot.go +++ b/pkg/bouncerbot/bouncerbot.go @@ -176,22 +176,22 @@ var messages = map[string][]string{ messageSuccessful: {"I found your info! I'll let you in now. :)"}, messageBadKey: { "Sorry, that key did not work. The key should be 64 hexadecimal characters, sent as " + - "plain text a single message by itself.", - "If you still have trouble, reach out to the admins for help.", + "plain text in a single message by itself.", + "If you still have trouble, ask for help in the waiting room channel.", }, - messageNotFound: {"Sorry, that key did not work. Reach out to the admins for help!"}, + messageNotFound: {"Sorry, that key did not work. Ask for help in the waiting room channel!"}, messageDecryptionError: { - "There was a decryption error with that key. Reach out to the admins for help!", + "There was a decryption error with that key. Ask for help in the waiting room channel!", }, messageNickPerm: { "Everything worked except I wasn't able to set your nickname because of your high role.", "Please set your nickname by sending `/nick FIRST LAST` in one of the channels.", }, messageAdmitError: { - "There was an error while trying to admit you. Reach out to the admins for help!", + "There was an error while trying to admit you. Ask for help in the waiting room channel!", }, messageOtherError: { - "There was an error with a message I tried to send. Reach out to the admins to complain!", + "There was an error with a message I tried to send. Complain in the waiting room channel!", }, } @@ -221,25 +221,25 @@ func (b *Bot) admit(u *db.User, dID string) error { var errs []error - err := b.GuildMemberNickname(b.Guild.GuildID, dID, u.Name) - if err != nil { - errs = append(errs, fmt.Errorf("set nick: %w", err)) - } - rolesToAdd := b.Guild.GetRoleIDsForUser(b.l, u) for _, roleID := range rolesToAdd { - err = b.GuildMemberRoleAdd(b.Guild.GuildID, dID, roleID) + err := b.GuildMemberRoleAdd(b.Guild.GuildID, dID, roleID) if err != nil { errs = append(errs, fmt.Errorf("set role '%s': %w", roleID, err)) } } - err = b.GuildMemberRoleRemove(b.Guild.GuildID, dID, b.Guild.NewbieRole) + err := b.GuildMemberRoleRemove(b.Guild.GuildID, dID, b.Guild.NewbieRole) if err != nil { errs = append(errs, fmt.Errorf("remove newbie role: %w", err)) } + err = b.GuildMemberNickname(b.Guild.GuildID, dID, u.Name) + if err != nil { + errs = append(errs, fmt.Errorf("set nick: %w", err)) + } + return errors.Join(errs...) }