mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-12 14:10:47 +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
|
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
|
// OnlyPublic requires that the ctx.Event is public message
|
||||||
func OnlyPublic(ctx *Ctx) bool {
|
func OnlyPublic(ctx *Ctx) bool {
|
||||||
if ctx.Message != nil && ctx.Message.SrcGuildID != "" {
|
if ctx.Message != nil && ctx.Message.SrcGuildID != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user