mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-14 21:26:54 +00:00
Remove the replit stuff
This commit is contained in:
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
|
node_modules
|
||||||
config.json
|
config.json
|
||||||
.env
|
.env
|
||||||
node_modules
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# selmerBot
|
# selmerBot
|
||||||
|
|
||||||
Created by ION606
|
Authors: ION606, MajorDrools
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
This is a bot modeled after Selmer Bringjord of RPI and all the wonderful things he says
|
This is a bot modeled after Selmer Bringjord of RPI and all the wonderful things he says
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
module.exports ={
|
||||||
|
name: "help",
|
||||||
|
description: "Gets help for all of Selmer Bot's commands",
|
||||||
|
execute(message, Client) {
|
||||||
|
const newEmbed = new Discord.MessageEmbed()
|
||||||
|
.setColor('#002eff')
|
||||||
|
.setTitle('My professional resume')
|
||||||
|
//.setURL('https://discordjs.guide/popular-topics/embeds.html#embed-preview')
|
||||||
|
//.setDescription('My professional resume')
|
||||||
|
.setImage('https://github.com/ION606/selmerBot/blob/main/Sleemer_Bringsjorgend.png?raw=true')
|
||||||
|
|
||||||
|
message.channel.send({ embeds: [newEmbed] });
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
config.json
|
||||||
|
.env
|
||||||
|
node_modules
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# selmerBot
|
||||||
|
|
||||||
|
Created by ION606
|
||||||
|
|
||||||
|
Description:
|
||||||
|
This is a bot modeled after Selmer Bringjord of RPI and all the wonderful things he says
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 862 KiB |
@@ -0,0 +1,47 @@
|
|||||||
|
module.exports = {
|
||||||
|
name: 'EC',
|
||||||
|
description: "Selmer Bot Dm's you for some *AHEM* extra credit",
|
||||||
|
execute(message) {
|
||||||
|
let dm;
|
||||||
|
let num = Math.floor(Math.random() * 10);
|
||||||
|
|
||||||
|
|
||||||
|
switch(num) {
|
||||||
|
case 0: dm = 'Hello there, let me show you some...logic';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1: dm = 'I think the sexiest part of a person is their brain';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2: dm = 'Hey babe, wanna make some negative money?';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3: dm = 'The AI is coming for you! Buy my book to find out how to stop them!';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4: dm = 'Did you know I proved P=NP. The proof is on my password-encrypted tablet.\nPretty safe there I reckon';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5: dm = 'I hate informal logic, but there\'s nothing informal about you!';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 6: dm = 'My book "A Modern Approach; Beginning Deductive Logic via HyperSlate®, Advanced" is now available online!';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 7: dm = 'HyperSlate is a flawless creation. I should know, I made it myself!';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 8: dm = 'Could a Robot Be a Bona Fide Hero? I think not! He\'s not me, after all!';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 9: dm = "Warning: Increasingly, the term ‘reasoning’ is used by some who don’t really do anything related to reasoning, as traditionally understood, to nonetheless label what they do. Fortunately, it’s easy to verify that some reasoning is that which is covered by formal logic: If the reasoning is explicit; links declarative statements or formulae together via explicit, abstract reasoning schemata or rules of inference (giving rise to at least explicit arguments, and often proofs); is surveyable and inspectable, and ultimately machine-checkable; then the reasoning in question is what formal logic is the science and engineering of. (An immediate consequence of the characteristics just listed is that AIs based on artificial neural networks don’t reason, ever.) In order to characterize /in/formal logic, one can remove from the previous sentence the requirements that the links must conform to explicit reasoning schemas or rules of inference, and machine-checkability. It follows that so-called informal logic would revolve around arguments, but not proofs. An excellent overview of informal logic, which will be completely ignored in this class, is provided in “Informal Logic” in the Stanford Encyclopedia of Philosophy. In this article, it’s made clear that, yes, informal logic concentrates on the nature and uses of argument. ";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: 'Logic kan redde menneskehten!';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
let ID = message.member.id;
|
||||||
|
message.client.users.fetch(ID).then(user => user.send(dm));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
module.exports = {
|
||||||
|
name: 'arrow',
|
||||||
|
description: 'Engage in a trademarked activity and throw an arrow at a trash can',
|
||||||
|
async execute(message, args) {
|
||||||
|
let counter = 0;
|
||||||
|
arrow = '>';
|
||||||
|
while (true) {
|
||||||
|
arrow = '-' + arrow;
|
||||||
|
message.channel.send(arrow);
|
||||||
|
await message.channel.messages.fetch({limit: 1}).then(messages => {
|
||||||
|
message.channel.bulkDelete(messages);
|
||||||
|
});
|
||||||
|
counter ++;
|
||||||
|
if (counter >= 5) {
|
||||||
|
message.channel.messages.fetch({limit: 1}).then(messages => {
|
||||||
|
message.channel.bulkDelete(messages);
|
||||||
|
});
|
||||||
|
arrow = arrow + '🗑️';
|
||||||
|
message.channel.send(arrow);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
module.exports = {
|
||||||
|
name: "Hello World",
|
||||||
|
description: "HI SELMER",
|
||||||
|
execute(message, args) {
|
||||||
|
message.channel.send("HI SELMER!!!");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
module.exports ={
|
||||||
|
name: 'kareoke',
|
||||||
|
description: 'Sing your least-favorite song with you favorite person, me!',
|
||||||
|
execute(message, args) {
|
||||||
|
const axios = require('axios');
|
||||||
|
const cheerio = require('cheerio')
|
||||||
|
const url = args[0];
|
||||||
|
if (args[0] == undefined) {
|
||||||
|
message.channel.send("Please pick out a song at https://www.karaoke-lyrics.net/\nThe command should look like\n/kareoke [link_here]");
|
||||||
|
} else {
|
||||||
|
axios(url)
|
||||||
|
.then(response => {
|
||||||
|
const html = response.data;
|
||||||
|
const $ = cheerio.load(html);
|
||||||
|
lyrics = $('.para_row').text();
|
||||||
|
breakbar = "---------------------------------------------";
|
||||||
|
|
||||||
|
message.channel.send(breakbar + "\n" + lyrics + "\n" + breakbar);
|
||||||
|
//console.log(lyrics);
|
||||||
|
})
|
||||||
|
.catch(console.error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//TEST: https://www.karaoketexty.cz/texty-pisni/zoegirl/plain-170199
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
module.exports = {
|
||||||
|
name: "links",
|
||||||
|
description: "A helpful list of links to all of Selmer's wonderful websites",
|
||||||
|
execute(message, args, Discord) {
|
||||||
|
const newEmbed = new Discord.MessageEmbed()
|
||||||
|
.setColor('#002eff')
|
||||||
|
.setTitle("Selmer's Links")
|
||||||
|
.addFields(
|
||||||
|
{name: 'HyperGrader', value: "https://rpi.logicamodernapproach.com/"},
|
||||||
|
{name: 'Personal Website', value: "http://www.logicamodernapproach.com/rpi/intlogs22.bringsjord/#sec-3"}
|
||||||
|
);
|
||||||
|
|
||||||
|
message.channel.send({ embeds: [newEmbed] });
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
const pathToFfmpeg = require('ffmpeg-static');
|
||||||
|
const { joinVoiceChannel } = require('@discordjs/voice');
|
||||||
|
const { generateDependencyReport } = require('@discordjs/voice');
|
||||||
|
const { VoiceConnectionStatus, AudioPlayerStatus } = require('@discordjs/voice');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: "playaudio",
|
||||||
|
execute(message, args, client) {
|
||||||
|
const channel = "930148609406685227";
|
||||||
|
//console.log(generateDependencyReport());
|
||||||
|
connection.on(VoiceConnectionStatus.Ready, (oldState, newState) => {
|
||||||
|
console.log('Connection is in the Ready state!');
|
||||||
|
});
|
||||||
|
const connection = joinVoiceChannel({
|
||||||
|
channelId: channel,
|
||||||
|
guildId: channel.guild,
|
||||||
|
adapterCreator: channel.guild.voiceAdapterCreator,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
module.exports = {
|
||||||
|
name: "profile",
|
||||||
|
description: "Posts a description of Monsieur Sleemer himself",
|
||||||
|
execute(message, args, Discord) {
|
||||||
|
const newEmbed = new Discord.MessageEmbed()
|
||||||
|
.setColor('#002eff')
|
||||||
|
.setTitle('My professional resume')
|
||||||
|
//.setURL('https://discordjs.guide/popular-topics/embeds.html#embed-preview')
|
||||||
|
//.setDescription('My professional resume')
|
||||||
|
.setImage('https://github.com/ION606/selmerBot/blob/main/Sleemer_Bringsjorgend.png?raw=true')
|
||||||
|
.addFields(
|
||||||
|
{name: 'My Epithets:', value: "Pearls of Wisdom"},
|
||||||
|
{name: '\t1. ', value: "Negative money is the best money"},
|
||||||
|
{name: '\t2. ', value: "There is no god, only logic"}
|
||||||
|
);
|
||||||
|
|
||||||
|
message.channel.send({ embeds: [newEmbed] });
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
module.exports = {
|
||||||
|
name: 'quotes',
|
||||||
|
description: "A public version of Extra Credit",
|
||||||
|
execute(message) {
|
||||||
|
let dm;
|
||||||
|
let num = Math.floor(Math.random() * 10);
|
||||||
|
|
||||||
|
|
||||||
|
switch(num) {
|
||||||
|
case 0: dm = 'Hello there, let me show you some...logic';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1: dm = 'I think the sexiest part of a person is their brain';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2: dm = 'Hey babe, wanna make some negative money?';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3: dm = 'The AI is coming for you! Buy my book to find out how to stop them!';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4: dm = 'Did you know I proved P=NP. The proof is on my password-encrypted tablet.\nPretty safe there I reckon';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5: dm = 'I hate informal logic, but there\'s nothing informal about you!';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 6: dm = 'My book "A Modern Approach; Beginning Deductive Logic via HyperSlate®, Advanced" is now available online!';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 7: dm = 'HyperSlate is a flawless creation. I should know, I made it myself!';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 8: dm = 'Could a Robot Be a Bona Fide Hero? I think not! He\'s not me, after all!';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 9: dm = "Warning: Increasingly, the term ‘reasoning’ is used by some who don’t really do anything related to reasoning, as traditionally understood, to nonetheless label what they do. Fortunately, it’s easy to verify that some reasoning is that which is covered by formal logic: If the reasoning is explicit; links declarative statements or formulae together via explicit, abstract reasoning schemata or rules of inference (giving rise to at least explicit arguments, and often proofs); is surveyable and inspectable, and ultimately machine-checkable; then the reasoning in question is what formal logic is the science and engineering of. (An immediate consequence of the characteristics just listed is that AIs based on artificial neural networks don’t reason, ever.) In order to characterize /in/formal logic, one can remove from the previous sentence the requirements that the links must conform to explicit reasoning schemas or rules of inference, and machine-checkability. It follows that so-called informal logic would revolve around arguments, but not proofs. An excellent overview of informal logic, which will be completely ignored in this class, is provided in “Informal Logic” in the Stanford Encyclopedia of Philosophy. In this article, it’s made clear that, yes, informal logic concentrates on the nature and uses of argument. ";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: 'Logic kan redde menneskehten!';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
message.channel.send(dm);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
module.exports ={
|
||||||
|
name: "scraper",
|
||||||
|
description: ".....",
|
||||||
|
execute(message, args) {
|
||||||
|
const axios = require('axios');
|
||||||
|
const cheerio = require('cheerio')
|
||||||
|
const url = args[0];
|
||||||
|
axios(url)
|
||||||
|
.then(response => {
|
||||||
|
const html = response.data;
|
||||||
|
const $ = cheerio.load(html);
|
||||||
|
lyrics = $('.para_row').text();
|
||||||
|
|
||||||
|
//message.channel.send(lyrics);
|
||||||
|
console.log(lyrics);
|
||||||
|
})
|
||||||
|
.catch(console.error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//TEST: https://www.karaoketexty.cz/texty-pisni/zoegirl/plain-170199
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
const { Client, Intents } = require('discord.js');
|
||||||
|
const Discord = require('discord.js');
|
||||||
|
const { token } = require('./config.json');
|
||||||
|
|
||||||
|
const client = new Client({
|
||||||
|
intents: [
|
||||||
|
Intents.FLAGS.GUILDS,
|
||||||
|
Intents.FLAGS.GUILD_MESSAGES,
|
||||||
|
Intents.FLAGS.GUILD_MESSAGE_REACTIONS
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
const prefix = '/';
|
||||||
|
|
||||||
|
|
||||||
|
const fs = require('fs');
|
||||||
|
const { exit } = require('process');
|
||||||
|
client.commands = new Discord.Collection();
|
||||||
|
|
||||||
|
client.commNames = new Discord.Collection();
|
||||||
|
|
||||||
|
const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
|
||||||
|
|
||||||
|
let i = 0;
|
||||||
|
for (const file of commandFiles) {
|
||||||
|
const command = require(`./commands/${file}`);
|
||||||
|
|
||||||
|
client.commands.set(command.name, command);
|
||||||
|
client.commNames.set(i, [command.name, command.description]);
|
||||||
|
i ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
client.commNames.set('length', i);
|
||||||
|
|
||||||
|
|
||||||
|
client.on('ready', () => {
|
||||||
|
console.log('SLEEMER BOT ONLINE!!!!! OH MY GOD OH MY GOD!!!');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
client.on('messageCreate', (message) => {
|
||||||
|
|
||||||
|
/*//PREVIEW COMMANDS START
|
||||||
|
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
|
||||||
|
|
||||||
|
lib.discord.commands['@0.0.0'].create({
|
||||||
|
"name": "test",
|
||||||
|
"description": "it's a test command!",
|
||||||
|
"options": []
|
||||||
|
});
|
||||||
|
|
||||||
|
//PREVIEW COMMANDS END*/
|
||||||
|
|
||||||
|
//COMMAND AREA
|
||||||
|
//Check if the prefix exists
|
||||||
|
if (!message.content.startsWith(prefix) || message.author.bot) return;
|
||||||
|
|
||||||
|
const args = message.content.slice(prefix.length).split(' ');
|
||||||
|
const command = args.shift().toLowerCase();
|
||||||
|
|
||||||
|
|
||||||
|
//Check if the user has sufficient permission
|
||||||
|
//Performes the command
|
||||||
|
switch(command) {
|
||||||
|
case 'test': client.commands.get('Hello World').execute(message, args);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'profile': client.commands.get('profile').execute(message, args, Discord);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'links': client.commands.get('links').execute(message, args, Discord);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'arrow': client.commands.get('arrow').execute(message, args, Discord);
|
||||||
|
break;
|
||||||
|
|
||||||
|
//case 'playaudio': client.commands.get('playaudio').execute(message, args, client, Discord);
|
||||||
|
//break;
|
||||||
|
|
||||||
|
case 'quotes': client.commands.get('quotes').execute(message, args, Discord, Client);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'extracredit': client.commands.get('EC').execute(message);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'scrape': client.commands.get('scraper').execute(message, args);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'kareoke': client.commands.get('kareoke').execute(message, args);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: message.channel.send("'" + message.content + "' is not a command!");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Last Line
|
||||||
|
client.login(token);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VS stuff: https://dbotmaker.io/forums/threads/make-bot-join-vc.95/
|
||||||
Reference in New Issue
Block a user