mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
Allow mentions in "!clean user"; fix some clean command bugs
This commit is contained in:
parent
9687359105
commit
22c515be38
2 changed files with 6 additions and 2 deletions
|
@ -83,6 +83,7 @@ export class GuildSavedMessages extends BaseRepository {
|
|||
.where("guild_id = :guild_id", { guild_id: this.guildId })
|
||||
.andWhere("channel_id = :channel_id", { channel_id: channelId })
|
||||
.andWhere("is_bot = 1")
|
||||
.andWhere("deleted_at IS NULL")
|
||||
.orderBy("id", "DESC")
|
||||
.limit(limit)
|
||||
.getMany();
|
||||
|
@ -94,6 +95,7 @@ export class GuildSavedMessages extends BaseRepository {
|
|||
.where("guild_id = :guild_id", { guild_id: this.guildId })
|
||||
.andWhere("channel_id = :channel_id", { channel_id: channelId })
|
||||
.andWhere("id < :beforeId", { beforeId })
|
||||
.andWhere("deleted_at IS NULL")
|
||||
.orderBy("id", "DESC")
|
||||
.limit(limit)
|
||||
.getMany();
|
||||
|
@ -105,6 +107,7 @@ export class GuildSavedMessages extends BaseRepository {
|
|||
.where("guild_id = :guild_id", { guild_id: this.guildId })
|
||||
.andWhere("channel_id = :channel_id", { channel_id: channelId })
|
||||
.andWhere("user_id = :user_id", { user_id: userId })
|
||||
.andWhere("deleted_at IS NULL")
|
||||
.orderBy("id", "DESC")
|
||||
.limit(limit)
|
||||
.getMany();
|
||||
|
@ -116,7 +119,8 @@ export class GuildSavedMessages extends BaseRepository {
|
|||
.where("guild_id = :guild_id", { guild_id: this.guildId })
|
||||
.andWhere("user_id = :user_id", { user_id: userId })
|
||||
.andWhere("channel_id = :channel_id", { channel_id: channelId })
|
||||
.andWhere("id > :afterId", { afterId });
|
||||
.andWhere("id > :afterId", { afterId })
|
||||
.andWhere("deleted_at IS NULL");
|
||||
|
||||
if (limit != null) {
|
||||
query = query.limit(limit);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue