diff options
| author | 8cy <[email protected]> | 2020-04-13 05:32:35 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-13 05:32:35 -0700 |
| commit | 9dff52f7d047c905326bc2f476ede5463e00f2a0 (patch) | |
| tree | 1fec8563b3b72fde9b2ab7ad9e56a97398798685 /bot.js | |
| parent | typescript (diff) | |
| download | s5nical-9dff52f7d047c905326bc2f476ede5463e00f2a0.tar.xz s5nical-9dff52f7d047c905326bc2f476ede5463e00f2a0.zip | |
typescript final
Diffstat (limited to 'bot.js')
| -rw-r--r-- | bot.js | 78 |
1 files changed, 0 insertions, 78 deletions
@@ -1,78 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const config_json_1 = __importDefault(require("./config.json")); -const discord_js_commando_1 = require("discord.js-commando"); -const path_1 = __importDefault(require("path")); -const discord_js_1 = require("discord.js"); -discord_js_1.Structures.extend('Guild', Guild => { - class MusicGuild extends Guild { - constructor(client, data) { - super(client, data); - this.musicData = { - queue: [], - isPlaying: false, - volume: 1, - songDispatcher: null - }; - } - } - return MusicGuild; -}); -const client = new discord_js_commando_1.CommandoClient({ - commandPrefix: 's5n!', - owner: '217348698294714370' -}); -client.registry - .registerDefaultTypes() - .registerGroups([ - ['fun', 'fun command group'], - ['moderation', 'moderation command group'], - ['utility', 'utility command group'], - ['voice', 'voice command group'] -]) - .registerDefaultGroups() - .registerDefaultCommands({ - help: true -}) - .registerCommandsIn(path_1.default.join(__dirname, 'commands')); -client.once('ready', () => { - console.log(`Started bot: ${client.user.tag} (ID: ${client.user.id})\nCurrently running on ${client.guilds.cache.size} server(s).`); - client.user.setActivity('psycho~ uwu', { - type: 'LISTENING' - }); - //client.channels.cache.get('600773421525237781').send('bot started up'); -}); -client.on('error', console.error); -client.on('debug', console.debug); -client.on('message', (msg) => __awaiter(void 0, void 0, void 0, function* () { - var msgContent = msg.content.toLowerCase(); - function prefixCheck() { - if (msgContent.startsWith('s5n!')) { - return true; - } - } - if (prefixCheck()) { - if (msg.channel.type == 'dm') { - console.log(msg.author.tag, 'says', msgContent, 'in a DM'); - } - else { - console.log(msg.member.user.tag, 'says', msgContent, 'in #' + msg.channel.name); - } - } - if (msg.mentions.everyone) { - msg.react(':ArisaPing:695887537390223402'); - } -})); -client.login(config_json_1.default['secret']); |