* Remove GroupDMChannels

they sparked no joy

* Start partials for message deletion

* MessageUpdate partials

* Add partials as an opt-in client option

* Add fetch() to Message

* Message.author should never be undefined

* Fix channels being the wrong type

* Allow fetching channels

* Refactor and add reaction add partials

* Reaction remove partials

* Check for emoji first

* fix message fetching

janky

* User partials in audit logs

* refactor overwrite code

* guild member partials

* partials as a whitelist

* document GuildMember#fetch

* fix: check whether a structure is a partial, not whether cache is true

* typings: Updated for latest commit (#3075)

* partials: fix messageUpdate behaviour (now "old" message can be partial)

* partials: add warnings and docs

* partials: add partials to index.yml

* partials: tighten "partial" definitions

* partials: fix embed-only messages counting as partials
This commit is contained in:
Amish Shah
2019-02-13 17:39:39 +00:00
committed by GitHub
parent 8910fed729
commit 5c3f5d7048
35 changed files with 295 additions and 383 deletions

View File

@@ -6,7 +6,7 @@ const ytdl = require('ytdl-core');
const prism = require('prism-media');
const fs = require('fs');
const client = new Discord.Client({ fetchAllMembers: false, apiRequestMethod: 'sequential' });
const client = new Discord.Client({ fetchAllMembers: false, partials: true, apiRequestMethod: 'sequential' });
const auth = require('./auth.js');
@@ -34,6 +34,15 @@ client.on('presenceUpdate', (a, b) => {
console.log(a ? a.status : null, b.status, b.user.username);
});
client.on('messageDelete', async (m) => {
if (m.channel.id != '80426989059575808') return;
console.log(m.channel.recipient);
console.log(m.channel.partial);
await m.channel.fetch();
console.log('\n\n\n\n');
console.log(m.channel);
});
client.on('message', m => {
if (!m.guild) return;
if (m.author.id !== '66564597481480192') return;