Repository
Current version released
5 years ago
Dependencies
deno.land/x
Versions
D-rex
d-rex is a simple deno discord framework that lets u register commands. d-rex is based on the harmony discord library and built with deno and ts.
example
// deno run --allow-net --allow-env --allow-read bot.ts
import 'https://deno.land/x/dotenv/load.ts';
import { app, Intents, type } from 'https://deno.land/x/drex/mod.ts';
const client = app(['~', '^']);
client.prefixes = ['~'];
client.command({
name: 'ping',
aliases: ['p'],
params: [
{
name: 'user',
type: type.Member,
},
],
handler: async (msg, args) => {
msg.reply(
`pong! ${(await client.member(args.user, msg.guild))?.toString()}`
);
},
});
client.listen(Deno.env.get('TOKEN'), [Intents.GUILDS, Intents.GUILD_MESSAGES]);contact
or discord with joerje#5185