mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-05 18:50:24 +08:00
fix: only ruls
This commit is contained in:
5
rules.go
5
rules.go
@@ -298,6 +298,11 @@ func OnlyDirect(ctx *Ctx) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// OnlyChannel requires that the ctx.Event is channel message
|
||||
func OnlyChannel(ctx *Ctx) bool {
|
||||
return !OnlyPrivate(ctx)
|
||||
}
|
||||
|
||||
// OnlyPublic requires that the ctx.Event is public message
|
||||
func OnlyPublic(ctx *Ctx) bool {
|
||||
if ctx.Message != nil && ctx.Message.SrcGuildID != "" {
|
||||
|
||||
Reference in New Issue
Block a user