mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
unblock /bonk to be used in general-chat
This commit is contained in:
parent
141387ec50
commit
1e8f0ab058
@ -2,14 +2,14 @@ import Discord,{SlashCommandBuilder} from 'discord.js';
|
|||||||
import { TClient } from 'src/client';
|
import { TClient } from 'src/client';
|
||||||
export default {
|
export default {
|
||||||
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
||||||
if (!client.isStaff(interaction.member) && interaction.channelId == '468835415093411863') return interaction.reply('This command is restricted to staff only in this channel due to high usage.')
|
//if (!client.isStaff(interaction.member) && interaction.channelId == '468835415093411863') return interaction.reply('This command is restricted to staff only in this channel due to high usage.')
|
||||||
const member = interaction.options.getUser('member');
|
const member = interaction.options.getUser('member');
|
||||||
const reason = interaction.options.getString('reason');
|
const reason = interaction.options.getString('reason');
|
||||||
const adminPerm = interaction.member.permissions.has('Administrator')
|
const adminPerm = interaction.member.permissions.has('Administrator')
|
||||||
if (!member) {
|
if (!member) {
|
||||||
return interaction.reply('You can\'t bonk the ghost.')
|
return interaction.reply('You can\'t bonk the ghost.')
|
||||||
} else {
|
} else {
|
||||||
//if (member && adminPerm) return interaction.reply('You cannot bonk an admin!')
|
//if (member && adminPerm) return interaction.reply('You cannot bonk an admin!') | i need halp with this
|
||||||
if (member) {
|
if (member) {
|
||||||
const embed = new client.embed().setColor(client.config.embedColor)
|
const embed = new client.embed().setColor(client.config.embedColor)
|
||||||
.setDescription(`> <@${member.id}> has been bonked!\n${reason?.length == null ? '' : `> Reason: **${reason}**`}`)
|
.setDescription(`> <@${member.id}> has been bonked!\n${reason?.length == null ? '' : `> Reason: **${reason}**`}`)
|
||||||
|
Loading…
Reference in New Issue
Block a user