That's what I call "commit"

This commit is contained in:
unknowableshade committed 2021-11-01 19:28:54 +03:00
1 parent 6cf6378ab3
commit 4ab7dd4a14
60 files changed
+2033 -995

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
# This file specifies files that are *not* uploaded to Google Cloud Platform
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore
# Node.js dependencies:
node_modules/
+3
View File
@@ -361,3 +361,6 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# typescript restrictions
dist/
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31808.319
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "NodejsConsoleApp1", "NodejsConsoleApp1.njsproj", "{0DDE9DED-3734-43AC-A218-393675657D81}"
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "5a0b-bot", "5a0b-bot.njsproj", "{0DDE9DED-3734-43AC-A218-393675657D81}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+27 -44
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<Name>NodejsConsoleApp1</Name>
<Name>5a0b-bot</Name>
<RootNamespace>NodejsConsoleApp1</RootNamespace>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
@@ -10,7 +10,8 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>0dde9ded-3734-43ac-a218-393675657d81</ProjectGuid>
<ProjectHome>.</ProjectHome>
<ProjectHome>
</ProjectHome>
<StartupFile>app.ts</StartupFile>
<StartWebBrowser>False</StartWebBrowser>
<SearchPath>
@@ -29,55 +30,37 @@
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<None Include="app.ts" />
<Content Include=".gitignore" />
<Content Include="app.yaml">
<SubType>Code</SubType>
</Content>
<Content Include="package.json" />
<Content Include="README.md" />
<Content Include="tsconfig.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="commands\" />
<Folder Include="types\" />
<Folder Include="src\" />
<Folder Include="src\commands\" />
<Folder Include="src\types\" />
</ItemGroup>
<ItemGroup>
<TypeScriptCompile Include="commands\clear.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="commands\insert.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="commands\jump.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="commands\pause.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="commands\play.ts" />
<TypeScriptCompile Include="commands\connect.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="commands\next.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="commands\queue.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="commands\remove.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="commands\seek.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="commands\stop.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="config.ts" />
<TypeScriptCompile Include="Procfile">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="types\Client.ts" />
<TypeScriptCompile Include="types\interfaces.ts" />
<TypeScriptCompile Include="types\Misc.ts" />
<TypeScriptCompile Include="types\Music.ts" />
<TypeScriptCompile Include="src\app.ts" />
<TypeScriptCompile Include="src\commands\clear.ts" />
<TypeScriptCompile Include="src\commands\connect.ts" />
<TypeScriptCompile Include="src\commands\insert.ts" />
<TypeScriptCompile Include="src\commands\jump.ts" />
<TypeScriptCompile Include="src\commands\next.ts" />
<TypeScriptCompile Include="src\commands\pause.ts" />
<TypeScriptCompile Include="src\commands\play.ts" />
<TypeScriptCompile Include="src\commands\queue.ts" />
<TypeScriptCompile Include="src\commands\remove.ts" />
<TypeScriptCompile Include="src\commands\seek.ts" />
<TypeScriptCompile Include="src\commands\stop.ts" />
<TypeScriptCompile Include="src\config.ts" />
<TypeScriptCompile Include="src\types\Client.ts" />
<TypeScriptCompile Include="src\types\interfaces.ts" />
<TypeScriptCompile Include="src\types\Misc.ts" />
<TypeScriptCompile Include="src\types\Music.ts" />
</ItemGroup>
<Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsToolsV2.targets" />
<ProjectExtensions>
-1
View File
@@ -1 +0,0 @@
worker1: node app.js
-23
View File
@@ -1,23 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Client_1 = require("./types/Client");
const token = process.env.DISCORD_TOKEN;
const client = new Client_1.MyClient("./commands/", "./events");
client.on("ready", () => {
if (!client.user)
return;
console.info(`Logged in as ${client.user.tag}!`);
client.user.setActivity("on sound waves.", { type: "PLAYING" });
});
client.on("messageCreate", async (message) => {
if (message.guild)
await message.guild.commands.set(client.restCommands);
});
client.on("interactionCreate", interaction => {
if (interaction.isCommand() && client.commands.has(interaction.commandName)) {
const command = client.commands.get(interaction.commandName);
command.run(client, interaction);
}
});
client.login(token);
//# sourceMappingURL=app.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,2CAA0C;AAE1C,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;AAExC,MAAM,MAAM,GAAG,IAAI,iBAAQ,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;AAEvD,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;IACpB,IAAI,CAAC,MAAM,CAAC,IAAI;QACZ,OAAO;IACX,OAAO,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;IACjD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;AACpE,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,EAAE,CAAC,eAAe,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IACzC,IAAI,OAAO,CAAC,KAAK;QACb,MAAM,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,EAAE,CAAC,mBAAmB,EAAE,WAAW,CAAC,EAAE;IACzC,IAAI,WAAW,CAAC,SAAS,EAAE,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE;QACzE,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;KACpC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC"}
+1
View File
@@ -0,0 +1 @@
runtime: nodejs16
-27
View File
@@ -1,27 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
const config_1 = require("../config");
const discord_js_1 = require("discord.js");
async function run(client, ctx) {
if (ctx.guildId === null)
return;
const player = client.players.getPlayer(ctx.guildId);
if (player) {
player.clear();
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle("Queue has been cleared.");
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
}
}
exports.run = run;
const data = {
name: "clear",
description: "Clears queue.",
};
exports.data = data;
//# sourceMappingURL=clear.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"clear.js","sourceRoot":"","sources":["clear.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,2CAA4I;AAOrI,KAAK,UAAU,GAAG,CAAC,MAAgB,EAAE,GAAuB;IAC/D,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI;QACpB,OAAO;IAEX,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAErD,IAAI,MAAM,EAAE;QACR,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,KAAK,GAAG,IAAI,yBAAY,EAAE;aAC3B,QAAQ,CAAC,eAAM,CAAC,KAAwB,CAAC;aACzC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;QAEzC,IAAI;YACA,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;SACxC;QAAC,MAAM,GAAG;KACd;AACL,CAAC;AAjBD,kBAiBC;AAED,MAAM,IAAI,GAAG;IACT,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,eAAe;CAC/B,CAAA;AAEQ,oBAAI"}
-42
View File
@@ -1,42 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
const config_1 = require("../config");
const discord_js_1 = require("discord.js");
async function run(client, ctx) {
if (ctx.guildId === null)
return;
let player = client.players.getPlayer(ctx.guildId);
if (!player)
player = client.players.genPlayer(ctx.guildId);
if (!player.connection) {
const channel = ctx.member.voice.channel;
if (channel) {
await player.connect(channel);
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle(`Successfully connected to ${channel.name}.`);
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
}
else {
client.players.delPlayer(ctx.guildId);
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle("Please connect to a voice channel.");
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
}
}
}
exports.run = run;
const data = {
name: "connect",
description: "Connect to voice channel."
};
exports.data = data;
//# sourceMappingURL=connect.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"connect.js","sourceRoot":"","sources":["connect.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,2CAA4F;AAKrF,KAAK,UAAU,GAAG,CAAC,MAAgB,EAAE,GAAuB;IAC/D,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI;QACpB,OAAO;IAGX,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAEnD,IAAI,CAAC,MAAM;QACP,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAEnD,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;QACpB,MAAM,OAAO,GAAI,GAAG,CAAC,MAAsB,CAAC,KAAK,CAAC,OAAO,CAAC;QAC1D,IAAI,OAAO,EAAE;YACT,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAE9B,MAAM,KAAK,GAAG,IAAI,yBAAY,EAAE;iBAC3B,QAAQ,CAAC,eAAM,CAAC,KAAwB,CAAC;iBACzC,QAAQ,CAAC,6BAA6B,OAAO,CAAC,IAAI,GAAG,CAAC,CAAA;YAE3D,IAAI;gBACA,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;aACxC;YAAC,MAAM,GAAG;SACd;aACI;YACD,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAEtC,MAAM,KAAK,GAAG,IAAI,yBAAY,EAAE;iBAC3B,QAAQ,CAAC,eAAM,CAAC,KAAwB,CAAC;iBACzC,QAAQ,CAAC,oCAAoC,CAAC,CAAA;YAEnD,IAAI;gBACA,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;aACxC;YAAC,MAAM,GAAG;SACd;KACJ;AACL,CAAC;AAnCD,kBAmCC;AAED,MAAM,IAAI,GAAG;IACT,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,2BAA2B;CAC3C,CAAA;AAEQ,oBAAI"}
-46
View File
@@ -1,46 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
const config_1 = require("../config");
const discord_js_1 = require("discord.js");
async function run(client, ctx) {
const pos = ctx.options.getString("position");
const query = ctx.options.getString("query");
if (ctx.guildId === null || query === null)
return;
let player = client.players.getPlayer(ctx.guildId);
if (!player)
return;
let state;
if (!isNaN(Number(query))) {
await player.addTrack(query, ctx.user, Number(query) - 1);
}
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle("Inserted.");
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
}
exports.run = run;
const data = {
name: "insert",
description: "Insert new track to specific position.",
options: [
{
name: "query",
description: "Title or URL of the song.",
type: "STRING",
required: true
},
{
name: "position",
description: "Position to insert.",
type: "STRING",
required: true
}
]
};
exports.data = data;
//# sourceMappingURL=insert.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"insert.js","sourceRoot":"","sources":["insert.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,2CAA4F;AAKrF,KAAK,UAAU,GAAG,CAAC,MAAgB,EAAE,GAAuB;IAC/D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";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
const config_1 = require("../config");
const discord_js_1 = require("discord.js");
async function run(client, ctx) {
const query = ctx.options.getString("position");
if (ctx.guildId === null || query === null)
return;
let player = client.players.getPlayer(ctx.guildId);
if (!player)
return;
let state;
if (!isNaN(Number(query))) {
state = await player.jump(Number(query) - 1);
}
else {
state = await player.jump(query);
}
if (state) {
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle("Jumped.");
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
}
}
exports.run = run;
const data = {
name: "jump",
description: "Jump to specific track in queue.",
options: [
{
name: "position",
description: "Position to jump to.",
type: "STRING",
required: true
}
]
};
exports.data = data;
//# sourceMappingURL=jump.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"jump.js","sourceRoot":"","sources":["jump.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,2CAA4F;AAKrF,KAAK,UAAU,GAAG,CAAC,MAAgB,EAAE,GAAuB;IAC/D,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEhD,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI;QACtC,OAAO;IAGX,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAEnD,IAAI,CAAC,MAAM;QACP,OAAO;IAEX,IAAI,KAAc,CAAC;IAEnB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;QACvB,KAAK,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;KAChD;SAAM;QACH,KAAK,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACpC;IAED,IAAI,KAAK,EAAE;QACP,MAAM,KAAK,GAAG,IAAI,yBAAY,EAAE;aAC3B,QAAQ,CAAC,eAAM,CAAC,KAAwB,CAAC;aACzC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAEzB,IAAI;YACA,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;SACxC;QAAC,MAAM,GAAG;KACd;AAEL,CAAC;AA9BD,kBA8BC;AAED,MAAM,IAAI,GAAG;IACT,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,kCAAkC;IAC/C,OAAO,EAAE;QACL;YACI,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,sBAAsB;YACnC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACjB;KACJ;CACJ,CAAA;AAEQ,oBAAI"}
-26
View File
@@ -1,26 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
const config_1 = require("../config");
const discord_js_1 = require("discord.js");
async function run(client, ctx) {
if (ctx.guildId === null)
return;
const player = client.players.getPlayer(ctx.guildId);
if (player)
player.skip();
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle("Skipped.");
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
}
exports.run = run;
const data = {
name: "next",
description: "Skip current song."
};
exports.data = data;
//# sourceMappingURL=next.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"next.js","sourceRoot":"","sources":["next.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,2CAA+E;AAKxE,KAAK,UAAU,GAAG,CAAC,MAAgB,EAAE,GAAuB;IAC/D,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI;QACpB,OAAO;IAGX,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAErD,IAAI,MAAM;QACN,MAAM,CAAC,IAAI,EAAE,CAAC;IAElB,MAAM,KAAK,GAAG,IAAI,yBAAY,EAAE;SAC3B,QAAQ,CAAC,eAAM,CAAC,KAAwB,CAAC;SACzC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAE1B,IAAI;QACA,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;KACxC;IAAC,MAAM,GAAG;AACf,CAAC;AAjBD,kBAiBC;AAED,MAAM,IAAI,GAAG;IACT,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,oBAAoB;CACpC,CAAA;AAEQ,oBAAI"}
-27
View File
@@ -1,27 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
const config_1 = require("../config");
const discord_js_1 = require("discord.js");
async function run(client, ctx) {
if (ctx.guildId === null)
return;
const player = client.players.getPlayer(ctx.guildId);
if (player) {
const state = player.pause();
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle(`Pause is now ${state ? "on" : "off"}.`);
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
}
}
exports.run = run;
const data = {
name: "pause",
description: "Toggle pause.",
};
exports.data = data;
//# sourceMappingURL=pause.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"pause.js","sourceRoot":"","sources":["pause.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,2CAA4I;AAOrI,KAAK,UAAU,GAAG,CAAC,MAAgB,EAAE,GAAuB;IAC/D,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI;QACpB,OAAO;IAEX,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAErD,IAAI,MAAM,EAAE;QACR,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;QAE7B,MAAM,KAAK,GAAG,IAAI,yBAAY,EAAE;aAC3B,QAAQ,CAAC,eAAM,CAAC,KAAwB,CAAC;aACzC,QAAQ,CAAC,gBAAgB,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;QAEvD,IAAI;YACA,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;SACxC;QAAC,MAAM,GAAG;KACd;AAGL,CAAC;AAnBD,kBAmBC;AAED,MAAM,IAAI,GAAG;IACT,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,eAAe;CAC/B,CAAA;AAEQ,oBAAI"}
-59
View File
@@ -1,59 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
const config_1 = require("../config");
const discord_js_1 = require("discord.js");
async function run(client, ctx) {
const query = ctx.options.getString("query");
if (ctx.guildId === null || query === null)
return;
let player = client.players.getPlayer(ctx.guildId);
if (!player)
player = client.players.genPlayer(ctx.guildId);
if (!player.connection) {
const channel = ctx.member.voice.channel;
if (channel) {
await player.connect(channel);
}
else {
client.players.delPlayer(ctx.guildId);
await ctx.reply("Please connect to a voice chat.");
return;
}
}
const track = await player.addTrack(query, ctx.user);
if (!player.nowPlaying) {
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle("Preparing player.");
player.setMessage(await ctx.channel.send({ embeds: [embed] }));
await player.play();
}
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle(track.title)
.setDescription("Has been pushed to queue.")
.setURL(track.url)
.setThumbnail(track.thumbnail)
.setAuthor(`@${ctx.user.tag}`, ctx.user.avatarURL());
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
console.log(`${track.title} added to ${ctx.guildId}`);
}
exports.run = run;
const data = {
name: "play",
description: "Play a song or add it to queue.",
options: [
{
name: "query",
description: "Title or URL of the song.",
type: "STRING",
required: true
}
]
};
exports.data = data;
//# sourceMappingURL=play.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"play.js","sourceRoot":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,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;KACvB;IAGD,MAAM,KAAK,GAAG,IAAI,yBAAY,EAAE;SAC3B,QAAQ,CAAC,eAAM,CAAC,KAAwB,CAAC;SACzC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;SACrB,cAAc,CAAC,2BAA2B,CAAC;SAC3C,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;SACjB,YAAY,CAAC,KAAK,CAAC,SAAS,CAAC;SAC7B,SAAS,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,SAAS,EAAY,CAAC,CAAC;IAEnE,IAAI;QACA,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;KACxC;IAAC,MAAM,GAAE;IAEV,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,aAAa,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;AAE1D,CAAC;AAlDD,kBAkDC;AAED,MAAM,IAAI,GAAG;IACT,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,iCAAiC;IAC9C,OAAO,EAAE;QACL;YACI,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,2BAA2B;YACxC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACjB;KACJ;CACJ,CAAA;AAEQ,oBAAI"}
-65
View File
@@ -1,65 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
const config_1 = require("../config");
const discord_js_1 = require("discord.js");
const Misc_1 = require("../types/Misc");
async function run(client, ctx) {
if (ctx.guildId === null)
return;
const player = client.players.getPlayer(ctx.guildId);
if (player) {
const queue = player.queue;
if (queue.length === 0) {
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle("Queue is empty.");
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
}
else {
let page = 0;
const maxPage = Math.floor(queue.length / 11);
const row = new discord_js_1.MessageActionRow()
.addComponents(new discord_js_1.MessageButton()
.setCustomId("QueueTop")
.setLabel("TOP")
.setStyle("SECONDARY"), new discord_js_1.MessageButton()
.setCustomId("QueueUp")
.setLabel("UP")
.setStyle("SECONDARY"), new discord_js_1.MessageButton()
.setCustomId("QueueDown")
.setLabel("DOWN")
.setStyle("SECONDARY"), new discord_js_1.MessageButton()
.setCustomId("QueueEnd")
.setLabel("END")
.setStyle("SECONDARY"));
await ctx.reply({
content: (0, Misc_1.generateQueue)(queue, page, player.queuePosition),
components: [row]
});
const filter = (btn) => btn.message === ctx.fetchReply();
const collector = ctx.channel.createMessageComponentCollector({ filter, time: 15000 });
collector.on("collect", async (btn) => {
switch (btn.customId) {
case "QueueTop": page = 0;
case "QueueUp": page = Math.max(page - 1, 0);
case "QueueDown": page = Math.min(page + 1, maxPage);
case "QueueEnd": page = maxPage;
}
await btn.update({
content: (0, Misc_1.generateQueue)(queue, page, player.queuePosition)
});
});
}
}
}
exports.run = run;
const data = {
name: "queue",
description: "Send player queue.",
};
exports.data = data;
//# sourceMappingURL=queue.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"queue.js","sourceRoot":"","sources":["queue.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,2CAA4I;AAE5I,wCAA8C;AAKvC,KAAK,UAAU,GAAG,CAAC,MAAgB,EAAE,GAAuB;IAC/D,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI;QACpB,OAAO;IAEX,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAErD,IAAI,MAAM,EAAE;QACR,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACpB,MAAM,KAAK,GAAG,IAAI,yBAAY,EAAE;iBAC3B,QAAQ,CAAC,eAAM,CAA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M,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;YAEvF,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,GAAsB,EAAE,EAAE;gBACrD,QAAQ,GAAG,CAAC,QAAQ,EAAE;oBAClB,KAAK,UAAU,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;oBAC1B,KAAK,SAAS,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;oBAC7C,KAAK,WAAW,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;oBACrD,KAAK,UAAU,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC;iBACnC;gBAED,MAAM,GAAG,CAAC,MAAM,CAAC;oBACb,OAAO,EAAE,IAAA,oBAAa,EAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC;iBAC5D,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;SAEN;KACJ;AAGL,CAAC;AApED,kBAoEC;AAED,MAAM,IAAI,GAAG;IACT,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,oBAAoB;CACpC,CAAA;AAEQ,oBAAI"}
-44
View File
@@ -1,44 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
const config_1 = require("../config");
const discord_js_1 = require("discord.js");
async function run(client, ctx) {
const query = ctx.options.getString("position");
if (ctx.guildId === null || query === null)
return;
let player = client.players.getPlayer(ctx.guildId);
if (!player)
return;
let state;
if (!isNaN(Number(query))) {
state = await player.remove(Number(query) - 1);
}
else {
state = await player.remove(query);
}
if (state) {
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle("Removed.");
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
}
}
exports.run = run;
const data = {
name: "remove",
description: "Remove specific track in queue.",
options: [
{
name: "position",
description: "Position to remove.",
type: "STRING",
required: true
}
]
};
exports.data = data;
//# sourceMappingURL=remove.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"remove.js","sourceRoot":"","sources":["remove.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,2CAA4F;AAKrF,KAAK,UAAU,GAAG,CAAC,MAAgB,EAAE,GAAuB;IAC/D,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEhD,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI;QACtC,OAAO;IAGX,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAEnD,IAAI,CAAC,MAAM;QACP,OAAO;IAEX,IAAI,KAAc,CAAC;IAEnB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;QACvB,KAAK,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;KAClD;SAAM;QACH,KAAK,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KACtC;IAED,IAAI,KAAK,EAAE;QACP,MAAM,KAAK,GAAG,IAAI,yBAAY,EAAE;aAC3B,QAAQ,CAAC,eAAM,CAAC,KAAwB,CAAC;aACzC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAE1B,IAAI;YACA,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;SACxC;QAAC,MAAM,GAAG;KACd;AAEL,CAAC;AA9BD,kBA8BC;AAED,MAAM,IAAI,GAAG;IACT,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,iCAAiC;IAC9C,OAAO,EAAE;QACL;YACI,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACjB;KACJ;CACJ,CAAA;AAEQ,oBAAI"}
-26
View File
@@ -1,26 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
async function run(client, ctx) {
const time = ctx.options.getInteger("time");
if (ctx.guildId === null || time === null)
return;
let player = client.players.getPlayer(ctx.guildId);
if (player)
await player.seek(time);
}
exports.run = run;
const data = {
name: "seek",
description: "Fastforward to timecode.",
options: [
{
name: "time",
description: "Timecode to seek.",
type: "INTEGER",
required: true
}
]
};
exports.data = data;
//# sourceMappingURL=seek.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"seek.js","sourceRoot":"","sources":["seek.ts"],"names":[],"mappings":";;;AAOO,KAAK,UAAU,GAAG,CAAC,MAAgB,EAAE,GAAuB;IAC/D,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAE5C,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI;QACrC,OAAO;IAGX,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAEnD,IAAI,MAAM;QACN,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAXD,kBAWC;AAED,MAAM,IAAI,GAAG;IACT,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,0BAA0B;IACvC,OAAO,EAAE;QACL;YACI,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,IAAI;SACjB;KACJ;CACJ,CAAA;AAEQ,oBAAI"}
-27
View File
@@ -1,27 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.data = exports.run = void 0;
const config_1 = require("../config");
const discord_js_1 = require("discord.js");
async function run(client, ctx) {
if (ctx.guildId === null)
return;
const player = client.players.getPlayer(ctx.guildId);
if (player) {
player.destroy();
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle(`Destroyed.`);
try {
await ctx.reply({ embeds: [embed] });
}
catch { }
}
}
exports.run = run;
const data = {
name: "stop",
description: "Destroys player.",
};
exports.data = data;
//# sourceMappingURL=stop.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"stop.js","sourceRoot":"","sources":["stop.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,2CAA4I;AAOrI,KAAK,UAAU,GAAG,CAAC,MAAgB,EAAE,GAAuB;IAC/D,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI;QACpB,OAAO;IAEX,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAErD,IAAI,MAAM,EAAE;QACR,MAAM,CAAC,OAAO,EAAE,CAAC;QAEjB,MAAM,KAAK,GAAG,IAAI,yBAAY,EAAE;aAC3B,QAAQ,CAAC,eAAM,CAAC,KAAwB,CAAC;aACzC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAE5B,IAAI;YACA,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;SACxC;QAAC,MAAM,GAAG;KACd;AAGL,CAAC;AAnBD,kBAmBC;AAED,MAAM,IAAI,GAAG;IACT,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,kBAAkB;CAClC,CAAA;AAEQ,oBAAI"}
-8
View File
@@ -1,8 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.design = void 0;
const design = {
color: '#C4A4BE'
};
exports.design = design;
//# sourceMappingURL=config.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"config.js","sourceRoot":"","sources":["config.ts"],"names":[],"mappings":";;;AAAA,MAAM,MAAM,GAAG;IACX,KAAK,EAAE,SAAS;CACnB,CAAA;AAEO,wBAAM"}
+1913 -120
View File
File diff suppressed because it is too large. Load diff
+18 -14
View File
@@ -1,27 +1,31 @@
{
"name": "nodejs-console-app1",
"engines": { "node": "16.9.1" },
"name": "5a0a-bot",
"engines": {
"node": "16.x.x"
},
"version": "0.0.0",
"description": "NodejsConsoleApp1",
"description": "Discord multifunctional bot",
"main": "app.js",
"author": {
"name": ""
"name": "unknowableshade"
},
"scripts": {
"build": "tsc --build",
"clean": "tsc --build --clean"
"clean": "tsc --build --clean",
"gcp-build": "tsc -p ."
},
"dependencies": {
"@types/node": "^14.14.7",
"typescript": "^4.0.5",
"discord.js": "13.2.0",
"@discordjs/opus": "^0.6.0",
"@discordjs/voice": "0.6.0",
"@types/node": "^14.14.7",
"discord-ytdl-core": "5.0.4",
"ytsr": "3.5.3",
"ytdl-core": "4.9.1",
"@discordjs/opus": "0.6.0",
"opusscript": "0.0.8",
"node-opus": "0.3.3",
"sodium": "3.0.2"
"discord.js": "13.2.0",
"libsodium-wrappers": "^0.7.9",
"typescript": "^4.0.5",
"yt-search": "2.10.2",
"ytdl-core": "4.9.1"
},
"devDependencies": {
"@types/yt-search": "^2.3.2"
}
}
View File
File renamed without changes.
File renamed without changes.
@@ -2,6 +2,7 @@ import { design } from "../config";
import { ColorResolvable, CommandInteraction, GuildMember, MessageEmbed } from "discord.js";
import { MyClient } from "../types/Client";
import { VoiceConnectionStatus } from "@discordjs/voice";
@@ -15,7 +16,7 @@ export async function run(client: MyClient, ctx: CommandInteraction) {
if (!player)
player = client.players.genPlayer(ctx.guildId);
if (!player.connection) {
if (!player.connection || player.connection.state.status === VoiceConnectionStatus.Disconnected) {
const channel = (ctx.member as GuildMember).voice.channel;
if (channel) {
await player.connect(channel);
@@ -40,6 +41,15 @@ export async function run(client: MyClient, ctx: CommandInteraction) {
} catch { }
}
}
else {
const embed = new MessageEmbed()
.setColor(design.color as ColorResolvable)
.setTitle("Already connected.")
try {
await ctx.reply({ embeds: [embed] });
} catch { }
}
}
const data = {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+7 -28
View File
@@ -1,7 +1,9 @@
import { design } from "../config";
import { ColorResolvable, CommandInteraction, GuildMember, MessageEmbed } from "discord.js";
import { ColorResolvable, CommandInteraction, GuildMember, Message, MessageEmbed } from "discord.js";
import { MyClient } from "../types/Client";
import { VoiceConnectionStatus } from "@discordjs/voice";
import { run as connect } from "./connect";
@@ -11,36 +13,15 @@ export async function run(client: MyClient, ctx: CommandInteraction) {
if (ctx.guildId === null || query === null)
return;
connect(client, ctx);
let player = client.players.getPlayer(ctx.guildId);
if (!player)
player = client.players.genPlayer(ctx.guildId);
if (!player.connection) {
const channel = (ctx.member as GuildMember).voice.channel;
if (channel) {
await player.connect(channel);
}
else {
client.players.delPlayer(ctx.guildId);
await ctx.reply("Please connect to a voice chat.");
return;
}
}
const player = client.players.genPlayer(ctx.guildId);
const track = await player.addTrack(query, ctx.user);
if (!player.nowPlaying) {
const embed = new MessageEmbed()
.setColor(design.color as ColorResolvable)
.setTitle("Preparing player.");
player.setMessage(await ctx.channel.send({ embeds: [embed] }));
await player.play();
}
const embed = new MessageEmbed()
.setColor(design.color as ColorResolvable)
.setTitle(track.title)
@@ -49,12 +30,10 @@ export async function run(client: MyClient, ctx: CommandInteraction) {
.setThumbnail(track.thumbnail)
.setAuthor(`@${ctx.user.tag}`, ctx.user.avatarURL() as string);
try {
await ctx.reply({ embeds: [embed] });
} catch {}
if (ctx.channel)
player.setMessage(await ctx.channel.send({ embeds: [embed] }));
console.log(`${track.title} added to ${ctx.guildId}`);
}
const data = {
+6 -2
View File
@@ -1,6 +1,6 @@
import { design } from "../config";
import { ButtonInteraction, ColorResolvable, CommandInteraction, Message, MessageActionRow, MessageButton, MessageEmbed } from "discord.js";
import { ButtonInteraction, CollectorFilter, ColorResolvable, CommandInteraction, Message, MessageActionRow, MessageButton, MessageComponentInteraction, MessageEmbed } from "discord.js";
import { MyClient } from "../types/Client";
import { generateQueue } from "../types/Misc";
import { EmojiIdentifierResolvable } from "discord.js";
@@ -54,8 +54,11 @@ export async function run(client: MyClient, ctx: CommandInteraction) {
components: [row]
});
const filter = (btn: ButtonInteraction) => btn.message === ctx.fetchReply() as unknown as Message;
const filter: CollectorFilter<MessageComponentInteraction[]> = (btn) => {
return btn.message === ctx.fetchReply() as unknown as Message;
};
if (ctx.channel) {
const collector = ctx.channel.createMessageComponentCollector({ filter, time: 15000 });
collector.on("collect", async (btn: ButtonInteraction) => {
@@ -70,6 +73,7 @@ export async function run(client: MyClient, ctx: CommandInteraction) {
content: generateQueue(queue, page, player.queuePosition)
});
});
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
+2 -2
View File
@@ -20,9 +20,9 @@ export function generateQueue(queue: track[], page: number, pos: number): string
const track = queue[i];
if (i === pos)
response += `${i + 1}. Current => ${track.title.slice(0, 35).padEnd(45, " ")} ${Math.floor(parseInt(track.duration) / 60)}:${parseInt(track.duration) % 60}\n`;
response += `${i + 1}. ${'Current =>' + track.title.slice(0, 35).padEnd(45, " ")} ${track.duration / 60}:${track.duration % 60}\n`;
else
response += `${i + 1}. ${track.title.slice(0, 35).padEnd(45, " ")} ${Math.floor(parseInt(track.duration) / 60)}:${parseInt(track.duration) % 60}\n`;
response += `${ i + 1 }. ${track.title.slice(0, 35).padEnd(45, " ")} ${track.duration / 60}:${track.duration % 60}\n`;
}
+19 -19
View File
@@ -1,10 +1,10 @@
import { VoiceConnection, AudioPlayer, createAudioResource, AudioPlayerStatus, joinVoiceChannel, createAudioPlayer, AudioResource, DiscordGatewayAdapterCreator } from "@discordjs/voice";
import { ColorResolvable, Guild, Message, MessageEmbed, StageChannel, User, VoiceChannel } from "discord.js";
import { design } from "../config";
const ytdl = require("discord-ytdl-core");
const ytsr = require("ytsr");
import ytdl from "discord-ytdl-core";
import { track, filter } from "./interfaces";
import { random_shuffle } from "./Misc";
import yts from "yt-search";
export class Player {
guild: Guild;
@@ -40,11 +40,10 @@ export class Player {
});
const resource = createAudioResource(stream, {
inlineVolume: true,
metadata: track
inlineVolume: true
});
this.player = await createAudioPlayer();
this.player = createAudioPlayer();
this.connection.subscribe(this.player);
await this.player.play(resource);
@@ -87,18 +86,13 @@ export class Player {
}
async addTrack(query: string, requester: User, index?: number): Promise<track> {
let songInfo;
if (ytdl.validateURL(query))
songInfo = await ytdl.getInfo(query);
else
songInfo = await ytdl.getInfo((await ytsr(query)).refinements[0].url);
const songInfo = (await yts(query)).videos[0];
const metadata: track = {
url: songInfo.videoDetails.video_url,
title: songInfo.videoDetails.title,
thumbnail: songInfo.videoDetails.thumbnails[0].url,
duration: songInfo.videoDetails.lengthSeconds,
url: songInfo.url,
title: songInfo.title,
thumbnail: songInfo.thumbnail,
duration: songInfo.duration.seconds,
requester: requester
};
@@ -151,7 +145,7 @@ export class Player {
remove(query: number | string): boolean {
if (typeof query === "number" && query < this.queue.length && query >= 0) {
if (query === this.queuePosition)
if (query === this.queuePosition && this.player)
this.player.stop();
this.queue.splice(query);
return true;
@@ -160,7 +154,7 @@ export class Player {
for (let i = 0; i < this.queue.length; i++) {
const track = this.queue[i];
if (track.title.toLowerCase().includes(String(query).toLowerCase())) {
if (i === this.queuePosition)
if (i === this.queuePosition && this.player)
this.player.stop();
this.queue.splice(i);
return true;
@@ -225,10 +219,16 @@ export class Music {
}
genPlayer(guildId: string): Player {
const player = new module.exports.Player();
this.players.set(guildId, player);
const player = this.players.get(guildId);
if (!player) {
const newPlayer = new module.exports.Player();
this.players.set(guildId, newPlayer);
return newPlayer;
}
else {
return player;
}
}
delPlayer(guildId: string) {
this.players.delete(guildId);
@@ -4,7 +4,7 @@ export interface track {
url: string;
title: string;
thumbnail: string;
duration: string;
duration: number;
requester: User;
}
+7 -1
View File
@@ -1,13 +1,19 @@
{
"compilerOptions": {
"module": "CommonJS",
"outDir": "./dist",
"strict": true,
"target": "ESNext",
"esModuleInterop": true,
"moduleResolution": "Node",
"lib": [ "ESNext", "DOM" ],
"sourceMap": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules"
"node_modules",
"dist"
]
}
-49
View File
@@ -1,49 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MyClient = void 0;
const discord_js_1 = require("discord.js");
const fs_1 = require("fs");
const Music_1 = require("./Music");
class MyClient extends discord_js_1.Client {
commands = new Map();
restCommands = [];
players = new Music_1.Music();
constructor(commandsPath, eventsPath) {
super({
intents: [
discord_js_1.Intents.FLAGS.GUILDS,
discord_js_1.Intents.FLAGS.GUILD_MESSAGES,
discord_js_1.Intents.FLAGS.GUILD_VOICE_STATES
]
});
const cmdFiles = (0, fs_1.readdirSync)(commandsPath).filter(file => file.endsWith(".js"));
for (const file of cmdFiles) {
Promise.resolve().then(() => __importStar(require(`../commands/${file}`))).then((command) => {
const name = command.data.name;
this.restCommands.push(command.data);
this.commands.set(name, command);
});
}
}
}
exports.MyClient = MyClient;
//# sourceMappingURL=Client.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"Client.js","sourceRoot":"","sources":["Client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAqE;AACrE,2BAAiC;AACjC,mCAAgC;AAGhC,MAAa,QAAS,SAAQ,mBAAM;IAChC,QAAQ,GAAG,IAAI,GAAG,EAAe,CAAC;IAClC,YAAY,GAA6B,EAAE,CAAC;IAC5C,OAAO,GAAG,IAAI,aAAK,EAAE,CAAC;IAGtB,YAAY,YAAoB,EAAE,UAAkB;QAChD,KAAK,CAAC;YACF,OAAO,EAAE;gBACL,oBAAO,CAAC,KAAK,CAAC,MAAM;gBACpB,oBAAO,CAAC,KAAK,CAAC,cAAc;gBAC5B,oBAAO,CAAC,KAAK,CAAC,kBAAkB;aACnC;SACJ,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,IAAA,gBAAW,EAAC,YAAY,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAEhF,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;YACzB,kDAAO,eAAe,IAAI,EAAE,IAAE,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC3C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACrC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACrC,CAAC,CAAC,CAAC;SACN;IACL,CAAC;CACJ;AAzBD,4BAyBC"}
-27
View File
@@ -1,27 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateQueue = exports.random_shuffle = void 0;
function random_shuffle(array) {
let currentIndex = array.length, randomIndex;
while (currentIndex != 0) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex--;
[array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
}
return array;
}
exports.random_shuffle = random_shuffle;
function generateQueue(queue, page, pos) {
let response = "```ml\n";
for (let i = page * 11; i < Math.min(queue.length, (page + 1) * 11); i++) {
const track = queue[i];
if (i === pos)
response += `${i + 1}. Current => ${track.title.slice(0, 35).padEnd(45, " ")} ${Math.floor(parseInt(track.duration) / 60)}:${parseInt(track.duration) % 60}\n`;
else
response += `${i + 1}. ${track.title.slice(0, 35).padEnd(45, " ")} ${Math.floor(parseInt(track.duration) / 60)}:${parseInt(track.duration) % 60}\n`;
}
response += '```';
return response;
}
exports.generateQueue = generateQueue;
//# sourceMappingURL=Misc.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"Misc.js","sourceRoot":"","sources":["Misc.ts"],"names":[],"mappings":";;;AAEA,SAAgB,cAAc,CAAC,KAAiB;IAC5C,IAAI,YAAY,GAAG,KAAK,CAAC,MAAM,EAAG,WAAW,CAAC;IAE9C,OAAO,YAAY,IAAI,CAAC,EAAE;QACtB,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,YAAY,CAAC,CAAC;QACvD,YAAY,EAAE,CAAC;QAEf,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;KACzF;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAXD,wCAWC;AAED,SAAgB,aAAa,CAAC,KAAc,EAAE,IAAY,EAAE,GAAW;IACnE,IAAI,QAAQ,GAAW,SAAS,CAAC;IAEjC,KAAK,IAAI,CAAC,GAAG,IAAI,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;QACtE,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAEvB,IAAI,CAAC,KAAK,GAAG;YACT,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,gBAAgB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;;YAE/J,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;KAE3J;IAED,QAAQ,IAAI,KAAK,CAAC;IAElB,OAAO,QAAQ,CAAC;AACpB,CAAC;AAhBD,sCAgBC"}
-201
View File
@@ -1,201 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Music = exports.Player = void 0;
const voice_1 = require("@discordjs/voice");
const discord_js_1 = require("discord.js");
const config_1 = require("../config");
const ytdl = require("discord-ytdl-core");
const ytsr = require("ytsr");
const Misc_1 = require("./Misc");
class Player {
guild;
music;
connection;
player;
message;
queue = [];
queuePosition = 0;
nowPlaying = undefined;
filters = [];
repeatMode = 0;
constructor(clientMusic, playerGuild) {
this.music = clientMusic;
this.guild = playerGuild;
}
async play(seek = 0) {
if (!this.connection || this.queue.length === 0)
return;
const track = this.queue[this.queuePosition];
const stream = ytdl(track.url, {
opusEncoded: true,
filter: "audioonly",
highWaterMark: 1 << 25,
seek: seek
});
const resource = (0, voice_1.createAudioResource)(stream, {
inlineVolume: true,
metadata: track
});
this.player = await (0, voice_1.createAudioPlayer)();
this.connection.subscribe(this.player);
await this.player.play(resource);
this.nowPlaying = resource;
if (this.message) {
const channel = this.message.channel;
try {
await this.message.delete();
}
catch (err) {
console.log(err);
}
const embed = new discord_js_1.MessageEmbed()
.setColor(config_1.design.color)
.setTitle(track.title)
.setURL(track.url)
.setThumbnail(track.thumbnail)
.setAuthor(`@${track.requester.tag}`, track.requester.avatarURL())
.setDescription("Is now beeing played.");
this.message = await channel.send({ embeds: [embed] });
}
this.player.on(voice_1.AudioPlayerStatus.Idle, async () => {
this.queuePosition = (this.queuePosition + 1) % this.queue.length;
await this.play();
});
}
async connect(channel) {
this.connection = (0, voice_1.joinVoiceChannel)({
channelId: channel.id,
guildId: channel.guildId,
selfDeaf: true,
adapterCreator: channel.guild.voiceAdapterCreator
});
}
async addTrack(query, requester, index) {
let songInfo;
if (ytdl.validateURL(query))
songInfo = await ytdl.getInfo(query);
else
songInfo = await ytdl.getInfo((await ytsr(query)).refinements[0].url);
const metadata = {
url: songInfo.videoDetails.video_url,
title: songInfo.videoDetails.title,
thumbnail: songInfo.videoDetails.thumbnails[0].url,
duration: songInfo.videoDetails.lengthSeconds,
requester: requester
};
if (!index)
this.queue.push(metadata);
else {
this.queue.splice(index, 0, metadata);
if (this.queuePosition >= index)
this.queuePosition++;
}
return metadata;
}
clear() {
this.queue = [];
this.queuePosition = 0;
this.nowPlaying = undefined;
if (this.player)
this.player.stop();
}
destroy() {
if (this.connection)
this.connection.disconnect();
this.music.delPlayer(this.guild.id);
}
async jump(query) {
if (!this.player)
return false;
if (typeof query === "number" && query < this.queue.length && query >= 0) {
this.queuePosition = query;
await this.play();
return true;
}
else {
for (let i = 0; i < this.queue.length; i++) {
const track = this.queue[i];
if (track.title.toLowerCase().includes(String(query).toLowerCase())) {
this.queuePosition = i;
await this.play();
return true;
}
}
}
return false;
}
remove(query) {
if (typeof query === "number" && query < this.queue.length && query >= 0) {
if (query === this.queuePosition)
this.player.stop();
this.queue.splice(query);
return true;
}
else {
for (let i = 0; i < this.queue.length; i++) {
const track = this.queue[i];
if (track.title.toLowerCase().includes(String(query).toLowerCase())) {
if (i === this.queuePosition)
this.player.stop();
this.queue.splice(i);
return true;
}
}
}
return false;
}
async seek(time) {
await this.play(time);
}
pause() {
if (!this.player)
return false;
if (this.player.state.status === voice_1.AudioPlayerStatus.Paused) {
this.player.unpause();
return false;
}
else {
this.player.pause();
return true;
}
}
repeat(mode) {
this.repeatMode = mode;
}
volume(amount) {
if (amount > 0 && amount < Infinity && this.nowPlaying && this.nowPlaying.volume) {
this.nowPlaying.volume.setVolumeLogarithmic(amount / 100);
return true;
}
return false;
}
shuffle() {
this.queue = (0, Misc_1.random_shuffle)(this.queue);
}
skip() {
if (this.player)
this.player.stop();
}
setMessage(message) {
this.message = message;
}
}
exports.Player = Player;
class Music {
players = new Map();
getPlayer(guildId) {
const player = this.players.get(guildId);
if (player)
return player;
}
genPlayer(guildId) {
const player = new module.exports.Player();
this.players.set(guildId, player);
return player;
}
delPlayer(guildId) {
this.players.delete(guildId);
}
}
exports.Music = Music;
//# sourceMappingURL=Music.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"Music.js","sourceRoot":"","sources":["Music.ts"],"names":[],"mappings":";;;AAAA,4CAA0L;AAC1L,2CAA6G;AAC7G,sCAAmC;AACnC,MAAM,IAAI,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,iCAAwC;AAExC,MAAa,MAAM;IACf,KAAK,CAAQ;IACb,KAAK,CAAQ;IAEb,UAAU,CAA8B;IACxC,MAAM,CAA0B;IAChC,OAAO,CAAsB;IAE7B,KAAK,GAAY,EAAE,CAAC;IACpB,aAAa,GAAG,CAAC,CAAC;IAClB,UAAU,GAA8B,SAAS,CAAC;IAClD,OAAO,GAAa,EAAE,CAAC;IACvB,UAAU,GAAG,CAAC,CAAC;IAEf,YAAY,WAAkB,EAAE,WAAkB;QAC9C,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC;QACzB,IAAI,CAAC,KAA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CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;oBACvB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;oBACrB,OAAO,IAAI,CAAC;iBACf;aACJ;SACJ;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAY;QACnB,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,KAAK;QACD,IAAI,CAAC,IAAI,CAAC,MAAM;YACZ,OAAO,KAAK,CAAC;QALine truncated
-3
View File
@@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=interfaces.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["interfaces.ts"],"names":[],"mappings":""}