>Update bot
Took 6 minutes
This commit is contained in:
parent
b56fca07c7
commit
3dcb292b15
10
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
10
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="SpellCheckingInspection" enabled="true" level="INFORMATION" enabled_by_default="true">
|
||||||
|
<option name="processCode" value="true" />
|
||||||
|
<option name="processLiterals" value="true" />
|
||||||
|
<option name="processComments" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
74
index.js
74
index.js
@ -154,14 +154,19 @@ client.on ( "message", async ( message ) =>
|
|||||||
const command = args.shift ().toLowerCase ();
|
const command = args.shift ().toLowerCase ();
|
||||||
|
|
||||||
|
|
||||||
if ( command === "ping" ) {
|
switch( command )
|
||||||
|
{
|
||||||
|
case "p":
|
||||||
|
case "ping":
|
||||||
const timeTaken = Date.now() - message.createdTimestamp;
|
const timeTaken = Date.now() - message.createdTimestamp;
|
||||||
message.reply(`Der Ping von mir liegt bei ${timeTaken}ms.`).then(() => {
|
message.reply(`Der Ping von mir liegt bei ${timeTaken}ms.`).then(() => {
|
||||||
});
|
});
|
||||||
}
|
break;
|
||||||
|
case "auflisten":
|
||||||
if ( command === "list" || command === "auflisten" || command === "liste" || command === "filter" )
|
case "liste":
|
||||||
{
|
case "filter":
|
||||||
|
case "show":
|
||||||
|
case "list":
|
||||||
// Listet alle Wörter des Servers mit indexen auf
|
// Listet alle Wörter des Servers mit indexen auf
|
||||||
let words = listWords( message.guild.id );
|
let words = listWords( message.guild.id );
|
||||||
if( words === false )
|
if( words === false )
|
||||||
@ -178,10 +183,10 @@ client.on ( "message", async ( message ) =>
|
|||||||
|
|
||||||
|
|
||||||
await message.channel.send ( `Folgende Wörter & Sätze stehen auf der Schwarzen Liste:\nIndex\tWort\n` + output );
|
await message.channel.send ( `Folgende Wörter & Sätze stehen auf der Schwarzen Liste:\nIndex\tWort\n` + output );
|
||||||
}
|
break;
|
||||||
|
case "remove":
|
||||||
if ( command === "remove" || command === "delete" || command === "del" )
|
case "delete":
|
||||||
{
|
case "del":
|
||||||
if ( args.length > 0)
|
if ( args.length > 0)
|
||||||
{
|
{
|
||||||
const index = Number.parseInt ( args[0] );
|
const index = Number.parseInt ( args[0] );
|
||||||
@ -203,10 +208,10 @@ client.on ( "message", async ( message ) =>
|
|||||||
{
|
{
|
||||||
await message.reply ( `bitte gebe einen Index mit an. ${ config.prefix }delete <index>` )
|
await message.reply ( `bitte gebe einen Index mit an. ${ config.prefix }delete <index>` )
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
|
case "add":
|
||||||
if ( command === "add" || command === "hinzufügen" || command === "addword" )
|
case "hinzufügen":
|
||||||
{
|
case "addword":
|
||||||
if ( args.length > 0 )
|
if ( args.length > 0 )
|
||||||
{
|
{
|
||||||
if( await addWord(message.guild.id, args[0]) )
|
if( await addWord(message.guild.id, args[0]) )
|
||||||
@ -222,18 +227,18 @@ client.on ( "message", async ( message ) =>
|
|||||||
{
|
{
|
||||||
await message.reply ( `bitte gebe ein Wort/Satz mit an. ${ config.prefix }add <Wort/Satz>` );
|
await message.reply ( `bitte gebe ein Wort/Satz mit an. ${ config.prefix }add <Wort/Satz>` );
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
|
case "setnotify":
|
||||||
if( command === "setnotify" || command === "setnotifychannel" || command === "setchannel" || command === "setchannel" )
|
case "setnotifychannel":
|
||||||
{
|
case "setnotify":
|
||||||
|
case "setchannel":
|
||||||
await setNotifyChannel( message.guild.id, message.channel.id );
|
await setNotifyChannel( message.guild.id, message.channel.id );
|
||||||
await message.reply( `der neue Notify-Channel ist nun dieser hier!` );
|
await message.reply( `der neue Notify-Channel ist nun dieser hier!` );
|
||||||
}
|
break;
|
||||||
|
case "clear":
|
||||||
if ( command === "c" || command === "clear" )
|
case "c":
|
||||||
{
|
|
||||||
await message.reply(`Befehl derzeit nicht aktiv!`);
|
await message.reply(`Befehl derzeit nicht aktiv!`);
|
||||||
return;
|
break;
|
||||||
async function clear() {
|
async function clear() {
|
||||||
let fetched;
|
let fetched;
|
||||||
do {
|
do {
|
||||||
@ -243,13 +248,30 @@ client.on ( "message", async ( message ) =>
|
|||||||
while(fetched.size >= 2);
|
while(fetched.size >= 2);
|
||||||
}
|
}
|
||||||
clear().then( () => { message.reply( `es wurden alle Nachrichten gelöscht!` ) } )
|
clear().then( () => { message.reply( `es wurden alle Nachrichten gelöscht!` ) } )
|
||||||
}
|
break;
|
||||||
|
case "?":
|
||||||
if( command === "help" || command === "h" )
|
case "help?":
|
||||||
{
|
case "help":
|
||||||
|
case "h":
|
||||||
|
case "hilfe":
|
||||||
let help = `**Hilfe**\nMein Prefix ist .w, setze dies einfach vor jeden Befehl!\n\nadd <Word/Sentence> - Fügt ein Wort/Satz zum Filter hinzu\ndelete <Index> - Löscht ein Wort/Satz\nlist - Listet alle Wörter auf\nsetnotify - Setzt den Notify-Channel auf den aktuellen Kanal`;
|
let help = `**Hilfe**\nMein Prefix ist .w, setze dies einfach vor jeden Befehl!\n\nadd <Word/Sentence> - Fügt ein Wort/Satz zum Filter hinzu\ndelete <Index> - Löscht ein Wort/Satz\nlist - Listet alle Wörter auf\nsetnotify - Setzt den Notify-Channel auf den aktuellen Kanal`;
|
||||||
|
|
||||||
await message.channel.send( help );
|
await message.channel.send( help );
|
||||||
|
break;
|
||||||
|
case "author":
|
||||||
|
await message.reply( `mein Vater ist Tobstr#7626` );
|
||||||
|
break;
|
||||||
|
case "idiot":
|
||||||
|
case "maul":
|
||||||
|
case "hurensohn":
|
||||||
|
case "nein":
|
||||||
|
case "support":
|
||||||
|
await message.reply( `schreibe meinem Vater Tobstr#7627 am besten eine Privat-Nachricht wenn ich nicht richtig gehandelt habe :c` );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
await message.reply( `den Befehl kenne ich leider nicht :c - .w help?` );
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user