fix: ts errors

This commit is contained in:
Skillz4Killz
2023-03-26 12:34:41 +00:00
parent fe81c94fc0
commit 39bac9fe0e
141 changed files with 546 additions and 417 deletions
+11
View File
@@ -110,4 +110,15 @@ describe('Manage Guilds', async () => {
it('Get vanity URL', async () => {
await expect(rest.getVanityUrl(e2ecache.guild.id)).to.eventually.rejected
})
// Get a welcome screen
// it('Get welcome screen', async () => {
// const screen = await rest.getWelcomeScreen(e2ecache.guild.id)
// await rest.editWelcomeScreen(e2ecache.guild.id, {
// enabled: true,
// description: 'some description',
// })
// })
})
+15 -16
View File
@@ -128,27 +128,26 @@ describe('Manage reactions', async () => {
})
})
describe("Manage pins", () => {
it('Pin, get, and unpin messages', async () => {
const channel = await rest.createChannel(e2ecache.guild.id, { name: 'pinning' })
const message = await rest.sendMessage(channel.id, { content: 'pin me' })
const message2 = await rest.sendMessage(channel.id, { content: 'pin me 2' })
describe('Manage pins', () => {
it('Pin, get, and unpin messages', async () => {
const channel = await rest.createChannel(e2ecache.guild.id, { name: 'pinning' })
const message = await rest.sendMessage(channel.id, { content: 'pin me' })
const message2 = await rest.sendMessage(channel.id, { content: 'pin me 2' })
await rest.pinMessage(channel.id, message.id)
await rest.pinMessage(channel.id, message2.id, 'with a reason')
await rest.pinMessage(channel.id, message.id)
await rest.pinMessage(channel.id, message2.id, 'with a reason')
const pins = await rest.getPinnedMessages(channel.id)
expect(pins.length).to.equal(2)
expect(pins.some(p => p.id === message.id)).to.equal(true)
const pins = await rest.getPinnedMessages(channel.id)
expect(pins.length).to.equal(2)
expect(pins.some((p) => p.id === message.id)).to.equal(true)
await rest.unpinMessage(channel.id, message.id)
await rest.unpinMessage(channel.id, message2.id, 'with a reason')
await rest.unpinMessage(channel.id, message.id)
await rest.unpinMessage(channel.id, message2.id, 'with a reason')
const unpinned = await rest.getPinnedMessages(channel.id)
expect(unpinned.length).to.equal(0)
const unpinned = await rest.getPinnedMessages(channel.id)
expect(unpinned.length).to.equal(0)
})
})
})
describe('Rate limit manager testing', () => {
it('Send 10 messages to 1 channel', async () => {