mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
allow search('string here') (#1408)
This commit is contained in:
@@ -186,6 +186,7 @@ class RESTMethods {
|
||||
}
|
||||
|
||||
search(target, options) {
|
||||
if (typeof options === 'string') options = { content: options };
|
||||
if (options.before) {
|
||||
if (!(options.before instanceof Date)) options.before = new Date(options.before);
|
||||
options.maxID = long.fromNumber(options.before.getTime() - 14200704e5).shiftLeft(22).toString();
|
||||
|
||||
Reference in New Issue
Block a user