move out src/test to test
This commit is contained in:
parent
f812e06d17
commit
46cbd66166
26 changed files with 51 additions and 45 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -109,6 +109,7 @@ yarn.lock
|
|||
|
||||
# PRIVACY XDDDD
|
||||
src/test/config.ts
|
||||
test/config.ts
|
||||
.vscode
|
||||
|
||||
# macOS is shit xD
|
||||
|
|
13
mod.ts
13
mod.ts
|
@ -104,7 +104,15 @@ export type {
|
|||
ClientStatus,
|
||||
StatusType
|
||||
} from './src/types/presence.ts'
|
||||
export { ChannelTypes } from './src/types/channel.ts'
|
||||
export {
|
||||
ChannelTypes,
|
||||
OverwriteType,
|
||||
OverrideType
|
||||
} from './src/types/channel.ts'
|
||||
export type {
|
||||
OverwriteAsOptions,
|
||||
OverwritePayload
|
||||
} from './src/types/channel.ts'
|
||||
export type { ApplicationPayload } from './src/types/application.ts'
|
||||
export type { ImageFormats, ImageSize } from './src/types/cdn.ts'
|
||||
export type {
|
||||
|
@ -129,8 +137,7 @@ export type {
|
|||
MessageStickerPayload,
|
||||
MessageTypes,
|
||||
OverwriteAsArg,
|
||||
Overwrite,
|
||||
OverwriteAsOptions
|
||||
Overwrite
|
||||
} from './src/types/channel.ts'
|
||||
export type { EmojiPayload } from './src/types/emoji.ts'
|
||||
export { Verification } from './src/types/guild.ts'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Client, Intents } from '../../mod.ts'
|
||||
import { Client, Intents } from '../mod.ts'
|
||||
import { TOKEN } from './config.ts'
|
||||
|
||||
const client = new Client()
|
|
@ -6,7 +6,7 @@ import {
|
|||
CommandContext,
|
||||
Extension,
|
||||
CommandBuilder
|
||||
} from '../../mod.ts'
|
||||
} from '../mod.ts'
|
||||
import { TOKEN } from './config.ts'
|
||||
|
||||
class MyClient extends CommandClient {
|
|
@ -4,9 +4,9 @@ import {
|
|||
Intents,
|
||||
CommandContext,
|
||||
Extension,
|
||||
GuildChannels
|
||||
} from '../../mod.ts'
|
||||
import { Invite } from '../structures/invite.ts'
|
||||
GuildChannels,
|
||||
Invite
|
||||
} from '../mod.ts'
|
||||
import { TOKEN } from './config.ts'
|
||||
|
||||
const client = new CommandClient({
|
|
@ -1,5 +1,4 @@
|
|||
import { Command } from '../../../mod.ts'
|
||||
import { CommandContext } from '../../models/command.ts'
|
||||
import { Command, CommandContext } from '../../mod.ts'
|
||||
|
||||
export default class AddEmojiCommand extends Command {
|
||||
name = 'addemoji'
|
|
@ -1,5 +1,4 @@
|
|||
import { Command } from '../../../mod.ts'
|
||||
import { CommandContext } from '../../models/command.ts'
|
||||
import { Command, CommandContext } from '../../mod.ts'
|
||||
|
||||
export default class EvalCommand extends Command {
|
||||
name = 'eval'
|
|
@ -1,5 +1,4 @@
|
|||
import { Command } from '../../../mod.ts'
|
||||
import { CommandContext } from '../../models/command.ts'
|
||||
import { Command, CommandContext } from '../../mod.ts'
|
||||
|
||||
export default class JoinCommand extends Command {
|
||||
name = 'join'
|
|
@ -1,6 +1,9 @@
|
|||
import { Command, VoiceChannel } from '../../../mod.ts'
|
||||
import { CommandContext } from '../../models/command.ts'
|
||||
import { ChannelTypes } from '../../types/channel.ts'
|
||||
import {
|
||||
Command,
|
||||
CommandContext,
|
||||
ChannelTypes,
|
||||
VoiceChannel
|
||||
} from '../../mod.ts'
|
||||
|
||||
export default class KickFromSpecificVoiceCommand extends Command {
|
||||
name = 'kickFromSpecificVoice'
|
|
@ -1,5 +1,4 @@
|
|||
import { Command } from '../../../mod.ts'
|
||||
import { CommandContext } from '../../models/command.ts'
|
||||
import { Command, CommandContext } from '../../mod.ts'
|
||||
|
||||
export default class KickFromVoiceCommand extends Command {
|
||||
name = 'kickFromVoice'
|
|
@ -1,5 +1,4 @@
|
|||
import { Command } from '../../../mod.ts'
|
||||
import { CommandContext } from '../../models/command.ts'
|
||||
import { Command, CommandContext } from '../../mod.ts'
|
||||
|
||||
export default class LeaveCommand extends Command {
|
||||
name = 'leave'
|
|
@ -1,5 +1,4 @@
|
|||
import { Command, Embed } from '../../../mod.ts'
|
||||
import { CommandContext } from '../../models/command.ts'
|
||||
import { Command, CommandContext, Embed } from '../../mod.ts'
|
||||
|
||||
export default class PingCommand extends Command {
|
||||
name = 'mentions'
|
|
@ -1,5 +1,4 @@
|
|||
import { Command } from '../../../mod.ts'
|
||||
import { CommandContext } from '../../models/command.ts'
|
||||
import { Command, CommandContext } from '../../mod.ts'
|
||||
|
||||
export default class PingCommand extends Command {
|
||||
name = 'ping'
|
|
@ -1,4 +1,4 @@
|
|||
import { Command, Member, CommandContext, Embed } from '../../../mod.ts'
|
||||
import { Command, Member, CommandContext, Embed } from '../../mod.ts'
|
||||
|
||||
export default class UserinfoCommand extends Command {
|
||||
name = 'userinfo'
|
|
@ -1,11 +1,11 @@
|
|||
import { Client, event } from '../../mod.ts'
|
||||
import { Client, event } from '../mod.ts'
|
||||
import { TOKEN } from './config.ts'
|
||||
|
||||
class MyClient extends Client {
|
||||
constructor() {
|
||||
super({
|
||||
token: TOKEN,
|
||||
intents: [],
|
||||
intents: []
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,9 @@ class MyClient extends Client {
|
|||
debug(title: string, msg: string): void {
|
||||
console.log(`[${title}] ${msg}`)
|
||||
if (title === 'Gateway' && msg === 'Initializing WebSocket...') {
|
||||
try { throw new Error("Stack") } catch (e) {
|
||||
try {
|
||||
throw new Error('Stack')
|
||||
} catch (e) {
|
||||
console.log(e.stack)
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ import {
|
|||
// PermissionFlags,
|
||||
// ChannelTypes,
|
||||
// GuildCreateOptions
|
||||
} from '../../mod.ts'
|
||||
} from '../mod.ts'
|
||||
import { TOKEN } from './config.ts'
|
||||
|
||||
const client = new Client()
|
|
@ -1,4 +1,4 @@
|
|||
import { Webhook } from '../../mod.ts'
|
||||
import { Webhook } from '../mod.ts'
|
||||
import { WEBHOOK } from './config.ts'
|
||||
|
||||
const webhook = await Webhook.fromURL(WEBHOOK)
|
|
@ -11,11 +11,11 @@ import {
|
|||
ChannelTypes,
|
||||
GuildTextChannel,
|
||||
checkGuildTextBasedChannel,
|
||||
Permissions
|
||||
} from '../../mod.ts'
|
||||
import { Collector } from '../models/collectors.ts'
|
||||
import { MessageAttachment } from '../structures/message.ts'
|
||||
import { OverrideType } from '../types/channel.ts'
|
||||
Permissions,
|
||||
Collector,
|
||||
MessageAttachment,
|
||||
OverrideType
|
||||
} from '../mod.ts'
|
||||
import { TOKEN } from './config.ts'
|
||||
|
||||
const client = new Client({
|
||||
|
@ -74,12 +74,12 @@ client.on('messageCreate', async (msg: Message) => {
|
|||
const guilds = await msg.client.guilds.collection()
|
||||
msg.channel.send(
|
||||
'Guild List:\n' +
|
||||
(guilds
|
||||
.array()
|
||||
.map((c: Guild, i: number) => {
|
||||
return `${i + 1}. ${c.name} - ${c.memberCount} members`
|
||||
})
|
||||
.join('\n') as string)
|
||||
(guilds
|
||||
.array()
|
||||
.map((c: Guild, i: number) => {
|
||||
return `${i + 1}. ${c.name} - ${c.memberCount} members`
|
||||
})
|
||||
.join('\n') as string)
|
||||
)
|
||||
} else if (msg.content === '!roles') {
|
||||
const col = await msg.guild?.roles.collection()
|
|
@ -1,4 +1,4 @@
|
|||
import { Client, Intents } from '../../mod.ts'
|
||||
import { Client, Intents } from '../mod.ts'
|
||||
import { TOKEN } from './config.ts'
|
||||
|
||||
const client = new Client()
|
Loading…
Reference in a new issue