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