1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-12 06:00:29 +08:00

fix: OnlyChannel & Intent

This commit is contained in:
源文雨
2023-10-19 13:51:03 +09:00
parent da5cad685a
commit 0f41190752
2 changed files with 9 additions and 3 deletions

View File

@@ -298,9 +298,9 @@ func OnlyDirect(ctx *Ctx) bool {
return false
}
// OnlyChannel requires that the ctx.Event is channel message
// OnlyChannel is !OnlyDirect
func OnlyChannel(ctx *Ctx) bool {
return !OnlyPrivate(ctx)
return !OnlyDirect(ctx)
}
// OnlyPublic requires that the ctx.Event is public message
@@ -314,7 +314,7 @@ func OnlyPublic(ctx *Ctx) bool {
return false
}
// OnlyPrivate requires that the ctx.Event is not public message
// OnlyPrivate is !OnlyPublic
func OnlyPrivate(ctx *Ctx) bool {
return !OnlyPublic(ctx)
}