1
0
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:
源文雨
2023-10-18 15:33:21 +09:00
parent 476766dc44
commit f674802998

View File

@@ -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 != "" {