Skip to content

Commit

Permalink
Don't use button in dm
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibowl committed Jun 9, 2021
1 parent 129763f commit 2d7899b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/Utils.ts
Expand Up @@ -475,6 +475,9 @@ export function getDeleteButton(): MessageActionRow {
}

export async function sendMessage(message: Message, content: string | MessageEmbed): Promise<Message | Message[]> {
if (message.channel.type !== "text")
return message.channel.send(content)

if (typeof content == "string")
return message.channel.send(content, {
components: [getDeleteButton()],
Expand Down

0 comments on commit 2d7899b

Please sign in to comment.