mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 16:52:16 +00:00
allow search('string here') (#1408)
This commit is contained in:
parent
53eda09f72
commit
c670209021
1 changed files with 1 additions and 0 deletions
|
|
@ -186,6 +186,7 @@ class RESTMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
search(target, options) {
|
search(target, options) {
|
||||||
|
if (typeof options === 'string') options = { content: options };
|
||||||
if (options.before) {
|
if (options.before) {
|
||||||
if (!(options.before instanceof Date)) options.before = new Date(options.before);
|
if (!(options.before instanceof Date)) options.before = new Date(options.before);
|
||||||
options.maxID = long.fromNumber(options.before.getTime() - 14200704e5).shiftLeft(22).toString();
|
options.maxID = long.fromNumber(options.before.getTime() - 14200704e5).shiftLeft(22).toString();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue