remove opine and oak deps and start adding tests

This commit is contained in:
DjDeveloperr 2021-02-01 14:07:54 +05:30
parent b7fee5a41f
commit b844a053e5
4 changed files with 68 additions and 33 deletions

View file

@ -1,4 +1,4 @@
import { Client, Message, Intents } from '../mod.ts'
import { Client, Message, GatewayIntents } from '../mod.ts'
const client = new Client()
@ -13,7 +13,7 @@ client.on('messageCreate', (msg: Message) => {
}
})
console.log('harmony - ping example')
console.log('Harmony - Ping Example')
const token = prompt('Input Bot Token:')
if (token === null) {
@ -21,23 +21,8 @@ if (token === null) {
Deno.exit()
}
const intents = prompt(
'Input Intents (0 = All, 1 = Presence, 2 = Server Members, 3 = None):'
)
if (intents === null || !['0', '1', '2', '3'].includes(intents)) {
console.log('No intents provided')
Deno.exit()
}
let ints
if (intents === '0') {
ints = Intents.All
} else if (intents === '1') {
ints = Intents.Presence
} else if (intents === '2') {
ints = Intents.GuildMembers
} else {
ints = Intents.None
}
client.connect(token, ints)
client.connect(token, [
GatewayIntents.GUILD_MESSAGES,
GatewayIntents.GUILDS,
GatewayIntents.DIRECT_MESSAGES
])