Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/refactor/bot' into refactor/bot
Browse files Browse the repository at this point in the history
  • Loading branch information
IJNKAWAKAZE committed Jul 4, 2024
2 parents 514a4e2 + 2c61895 commit 50b21f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/gatekeeper/callback_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func CallBackData(callBack tgbotapi.Update) error {

if d[2] == "PASS" || d[2] == "BAN" {

if !bot.Arknights.IsAdminWithPermissions(chatId, callbackQuery.From.ID, 16) {
if !bot.Arknights.IsAdminWithPermissions(chatId, callbackQuery.From.ID, tgbotapi.AdminCanRestrictMembers) {
callbackQuery.Answer(true, "无使用权限!")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/system/callback_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func Report(callBack tgbotapi.Update) error {
target, _ := strconv.ParseInt(d[2], 10, 64)
targetMessageId, _ := strconv.Atoi(d[3])

if !bot.Arknights.IsAdminWithPermissions(chatId, userId, 16) {
if !bot.Arknights.IsAdminWithPermissions(chatId, userId, tgbotapi.AdminCanRestrictMembers) {
callbackQuery.Answer(true, "无使用权限!")
return nil
}
Expand Down

0 comments on commit 50b21f9

Please sign in to comment.