mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 14:41:36 +00:00
File resolving can use http too now
This commit is contained in:
parent
78e0d88f55
commit
1e2e940b98
2 changed files with 2 additions and 2 deletions
File diff suppressed because one or more lines are too long
|
|
@ -184,7 +184,7 @@ class ClientDataResolver {
|
|||
resolveFile(resource) {
|
||||
if ($string(resource)) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (/^https?:\/\//.test(resource)) {
|
||||
if (/^http?:\/\//.test(resource)) {
|
||||
request.get(resource)
|
||||
.set('Content-Type', 'blob')
|
||||
.end((err, res) => err ? reject(err) : resolve(res.body));
|
||||
|
|
|
|||
Loading…
Reference in a new issue