Refactor post handling and add command setup for Telegram bot
This commit is contained in:
@@ -65,3 +65,13 @@ func (c *Config) IsAdmin(userID int64) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// IsSuperAdmin 检查是否为超级管理员(配置文件中的管理员)
|
||||
func (c *Config) IsSuperAdmin(userID int64) bool {
|
||||
for _, id := range c.Admins {
|
||||
if id == userID {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user