✅ Do some more tests
This commit is contained in:
parent
07dae683dc
commit
f3115af2b9
1 changed files with 18 additions and 0 deletions
|
@ -15,6 +15,7 @@ import {
|
|||
} from '../../mod.ts'
|
||||
import { Collector } from '../models/collectors.ts'
|
||||
import { MessageAttachment } from '../structures/message.ts'
|
||||
import { OverrideType } from '../types/channel.ts'
|
||||
import { TOKEN } from './config.ts'
|
||||
|
||||
const client = new Client({
|
||||
|
@ -233,6 +234,23 @@ client.on('messageCreate', async (msg: Message) => {
|
|||
})
|
||||
msg.channel.send(`Done!`)
|
||||
}
|
||||
} else if (msg.content === '!updateBasicOverwrites') {
|
||||
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
||||
if (!checkGuildTextBasedChannel(msg.channel)) {
|
||||
return msg.channel.send("This isn't a guild text channel!")
|
||||
}
|
||||
if (msg.member !== undefined) {
|
||||
await msg.channel.editOverwrite(
|
||||
{
|
||||
id: msg.member,
|
||||
allow: Permissions.DEFAULT.toString()
|
||||
},
|
||||
{
|
||||
overriteAllow: OverrideType.REMOVE
|
||||
}
|
||||
)
|
||||
msg.channel.send(`Done!`)
|
||||
}
|
||||
} else if (msg.content === '!addAllRoles') {
|
||||
const roles = await msg.guild?.roles.array()
|
||||
if (roles !== undefined) {
|
||||
|
|
Loading…
Reference in a new issue