Simp-O-Matic

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

commit 8dbe7930f11ee8da753f8df90679b08732a09bdd
parent e9a7a9f3a55cff0aa0339f933217c74704ded787
Author: Daniel <23189912+danyisill@users.noreply.github.com>
Date:   Fri, 10 Jul 2020 19:48:30 +0300

Update youtube.ts
Diffstat:
Mlib/commands/youtube.ts | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/commands/youtube.ts b/lib/commands/youtube.ts @@ -21,7 +21,7 @@ export default async (home_scope: HomeScope) => { } } - const result = await fetch(`https://invidio.us/api/v1/search?q=${query}&sort_by=${sort_by}&type=${type}`); + const result = await fetch(encodeURI(`https://invidio.us/api/v1/search?q=${query}&sort_by=${sort_by}&type=${type}`)); const res_json = await result.json(); const res = res_json[Math.abs(num - 1)]; let duration = new Date(res.lengthSeconds * 1000)