1
0
mirror of https://github.com/fumiama/ReiBot.git synced 2026-06-16 00:15:37 +08:00
This commit is contained in:
源文雨
2022-06-10 19:58:48 +08:00
parent e3c0d5efd6
commit 72390b4c09
14 changed files with 845 additions and 20 deletions

View File

@@ -308,6 +308,14 @@ func AdminPermission(ctx *Ctx) bool {
return m.IsCreator() || m.IsAdministrator()
}
// UserOrGrpAdmin 允许用户单独使用或群管使用
func UserOrGrpAdmin(ctx *Ctx) bool {
if OnlyPublic(ctx) {
return AdminPermission(ctx)
}
return OnlyToMe(ctx)
}
// IsPhoto 消息是图片返回 true
func IsPhoto(ctx *Ctx) bool {
msg, ok := ctx.Value.(*tgba.Message)