-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Simyon264/dev
Version 3.8.9
- Loading branch information
Showing
10 changed files
with
138 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const f = require('../functions.js'); | ||
const discord = require('discord.js'); | ||
const fs = require("fs") | ||
|
||
module.exports = { | ||
name: 'shuffle', | ||
description: f.localization("commands","shuffle","exports").description, | ||
category: 'music', | ||
modcommand: false, | ||
usage: f.localization("commands","shuffle","exports").usage, | ||
perms: '', | ||
alias: [], | ||
cooldown: 1, | ||
run: function (message, prefix, args, client) { | ||
const serverQueue = queue.get(message.channel.guild.id); | ||
const channel = message.member.voice.channel | ||
|
||
if (!serverQueue) return message.reply("Ich bin nicht Verbunden.") | ||
if (!serverQueue.playing) return message.reply("Ich spiele aktuell nichst.") | ||
|
||
if (message.member.voice.channel.id != queue.get(message.channel.guild.id).voiceChannel.id) return message.reply("Du musst mit dem Bot in einem Sprachkanal sein."); | ||
|
||
function shuffleArray(array) { | ||
for (let i = array.length - 1; i > 0; i--) { | ||
const j = Math.floor(Math.random() * (i + 1)); | ||
[array[i], array[j]] = [array[j], array[i]]; | ||
} | ||
} | ||
|
||
|
||
let curSong = serverQueue.songs.splice(0, 1)[0] | ||
let newArray = serverQueue.songs | ||
shuffleArray(newArray) | ||
newArray.splice(0, 0, curSong) | ||
serverQueue.songs = newArray; | ||
queue.set(message.guild.id, serverQueue) | ||
message.reply("Die Songliste wurde gemischt."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const f = require('../functions.js'); | ||
const discord = require('discord.js'); | ||
const fs = require("fs") | ||
|
||
module.exports = { | ||
name: 'volume', | ||
description: f.localization("commands","volume","exports").description, | ||
category: 'music', | ||
modcommand: false, | ||
usage: f.localization("commands","volume","exports").usage, | ||
perms: '', | ||
alias: ["v"], | ||
cooldown: 1, | ||
run: function (message, prefix, args, client) { | ||
const serverQueue = queue.get(message.channel.guild.id); | ||
const channel = message.member.voice.channel | ||
|
||
if (!serverQueue) return message.reply("Ich bin nicht Verbunden.") | ||
if (channel.id != queue.get(message.channel.guild.id).voiceChannel.id) return message.reply("Du musst mit dem Bot in einem Sprachkanal sein."); | ||
if (args.length <= 1) return message.reply("Bitte gebe eine neue Lautstärke an.") | ||
|
||
let newVolume = parseInt(args[1]) | ||
if (newVolume == NaN || newVolume == undefined || newVolume == 0) newVolume = 50; | ||
if (newVolume > 200 || newVolume < 1) newVolume = 50 | ||
|
||
serverQueue.source.volume?.setVolume(newVolume / 100) | ||
serverQueue.volume = newVolume | ||
queue.set(message.guild.id, serverQueue) | ||
message.reply(`Lautstärke auf ${newVolume} gesetzt.`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
Version 3.7.9 | ||
- Nickname log gefixt | ||
- Musik bot funktion hinzugefügt. | ||
Version 3.8.9 | ||
- Shuffle hinzugefügt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.7.9 | ||
3.8.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "dlgmwarn", | ||
"version": "3.7.9", | ||
"version": "3.8.9", | ||
"description": "", | ||
"main": "bot.js", | ||
"scripts": { | ||
|