Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

commit 708999aad4dd3aaffa411384f9691468bc2ee093
parent ed2b00f52fd51a476391f0a1477cbf448e951a02
Author: Fredrik <moi@knutsen.co>
Date:   Tue,  4 Aug 2020 22:05:18 +0200

Merge pull request #17 from Accelarion/patch-3

I have no idea what i'm doing (attempted to fix encoding for URIs)
Diffstat:
Mlib/commands/youtube.ts | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/lib/commands/youtube.ts b/lib/commands/youtube.ts @@ -8,6 +8,7 @@ import fetch from "node-fetch"; export default async (home_scope: HomeScope) => { const { message, args } = home_scope; var query = args.join(" ").trim(); + query = encodeURI(query); const sort_by = (args[0] == "new") ? "upload_date" : "relevance"; const type = (args[0] == "channel" || args[0] == "playlist") ? args.shift() : "video"; let num : number = 1;