buy, use, delete, edit item

This commit is contained in:
stjet
2024-08-16 04:38:24 +00:00
parent 38c2700c2f
commit 3145f52df7
9 changed files with 258 additions and 5 deletions

View File

@@ -1,6 +1,10 @@
import type { ChatInputCommandInteraction, GuildMember } from "discord.js";
import type { UpdateResult } from "mongodb";
export function did_update(result: UpdateResult): boolean {
return result.modifiedCount > 0;
}
export function has_role(interaction: ChatInputCommandInteraction, role_id: string): boolean {
return (interaction.member as GuildMember).roles.cache.some((r) => r.id === role_id);
}