mirror of https://github.com/thaldrin/thaldrin.git
This commit is contained in:
parent
e2be3a994f
commit
014e18f72a
18
index.ts
18
index.ts
|
@ -1,9 +1,10 @@
|
||||||
import { Discord } from "./src/modules/eu/src/index"
|
import "./src/utils/patch"
|
||||||
import path from "path"
|
|
||||||
import config from "./src/utils/config"
|
|
||||||
import { Intents } from "./src/modules/eu/src/misc/imports"
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import modulus from "./src/utils/modulus"
|
import { Discord } from "@modules/eu/src/index"
|
||||||
|
import path from "path"
|
||||||
|
import config from "@utils/config"
|
||||||
|
import { Intents } from "@modules/eu/src/misc/imports"
|
||||||
|
|
||||||
|
|
||||||
const Bot = new Discord.Client({
|
const Bot = new Discord.Client({
|
||||||
|
@ -12,6 +13,9 @@ const Bot = new Discord.Client({
|
||||||
commands: path.join(__dirname, "src", "discord", "commands"),
|
commands: path.join(__dirname, "src", "discord", "commands"),
|
||||||
events: path.join(__dirname, "src", "discord", "events"),
|
events: path.join(__dirname, "src", "discord", "events"),
|
||||||
options: {
|
options: {
|
||||||
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.DIRECT_MESSAGES]
|
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.DIRECT_MESSAGES],
|
||||||
}
|
commandCategories: true,
|
||||||
|
debug: true
|
||||||
|
},
|
||||||
|
|
||||||
})
|
})
|
7
shard.ts
7
shard.ts
|
@ -1,7 +1,8 @@
|
||||||
require("module-alias/register")
|
import "./src/utils/patch"
|
||||||
|
|
||||||
import { Discord } from "./src/modules/eu/src/index"
|
|
||||||
import config from "./src/utils/config"
|
import { Discord } from "@modules/eu/src/index"
|
||||||
|
import config from "@utils/config"
|
||||||
|
|
||||||
let Sharder = new Discord.ShardingManager('./build/index.js',
|
let Sharder = new Discord.ShardingManager('./build/index.js',
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
import { Context } from "@utils/types"
|
||||||
|
import { Command } from "@modules/eu/src/index"
|
||||||
|
import request from "@utils/animals"
|
||||||
|
import { MessageEmbed } from "discord.js"
|
||||||
|
|
||||||
|
export = class Bird extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: "bird",
|
||||||
|
aliases: ["birb"],
|
||||||
|
description: "Sends a random bird image",
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async run(context: Context): Promise<any> {
|
||||||
|
let { image, provider } = await request("bird")
|
||||||
|
// console.log({ image, provider })
|
||||||
|
if (context.settings.embeds) {
|
||||||
|
let Embed = new MessageEmbed()
|
||||||
|
.setImage(image[0])
|
||||||
|
.setFooter(`Thaldrin - Image provided by ${provider}`, "https://thaldrin.media/avatar.png")
|
||||||
|
.setColor("ORANGE")
|
||||||
|
|
||||||
|
context.channel.send({ embeds: [Embed] })
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
context.channel.send(image[0])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { Context } from "@utils/types"
|
||||||
|
import { Command } from "@modules/eu/src/index"
|
||||||
|
|
||||||
|
export = class TestingCommand extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: "testing",
|
||||||
|
aliases: ["t"],
|
||||||
|
})
|
||||||
|
// console.log(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
async run(context: Context): Promise<any> {
|
||||||
|
// console.log(context)
|
||||||
|
// console.log(this.nsfw)
|
||||||
|
console.log("testing")
|
||||||
|
return "Generic command"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue