feat: Add full lists in nsfw channel
This commit is contained in:
parent
cd8b750cc3
commit
e3dab3b1af
1 changed files with 9 additions and 1 deletions
|
@ -26,8 +26,16 @@ func MessageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||||
|
|
||||||
if command == "" {
|
if command == "" {
|
||||||
var datas []databases.Text
|
var datas []databases.Text
|
||||||
|
var filter bson.D
|
||||||
|
|
||||||
cur, err := databases.Texts.Find(context.TODO(), bson.D{{Key: "persona", Value: "muffin"}})
|
channel, _ := s.Channel(m.ChannelID)
|
||||||
|
if channel.NSFW {
|
||||||
|
filter = bson.D{{}}
|
||||||
|
} else {
|
||||||
|
filter = bson.D{{Key: "persona", Value: "muffin"}}
|
||||||
|
}
|
||||||
|
|
||||||
|
cur, err := databases.Texts.Find(context.TODO(), filter)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue