Temp solution for duplicate channels
parent
c7b7b784d9
commit
4e667bc689
11
index.js
11
index.js
|
@ -214,6 +214,17 @@ function getModmailChannel(user, allowCreate = true) {
|
||||||
if (channel) {
|
if (channel) {
|
||||||
return Promise.resolve(channel);
|
return Promise.resolve(channel);
|
||||||
} else {
|
} else {
|
||||||
|
// FIXME: Temp fix, return mock channel and assume it exists.. maybe
|
||||||
|
const channelId = modMailChannels[user.id];
|
||||||
|
return Promise.resolve({
|
||||||
|
id: channelId,
|
||||||
|
name: 'temp-mock-channel',
|
||||||
|
createMessage: function() {
|
||||||
|
return modMailGuild.createMessage(channelId, ...arguments);
|
||||||
|
},
|
||||||
|
mention: `<#${channelId}>`,
|
||||||
|
});
|
||||||
|
|
||||||
// If the cache value was invalid, remove it
|
// If the cache value was invalid, remove it
|
||||||
delete modMailChannels[user.id];
|
delete modMailChannels[user.id];
|
||||||
console.log(`[NOTE] INVALID CACHE VALUE FOR ${user.id}`);
|
console.log(`[NOTE] INVALID CACHE VALUE FOR ${user.id}`);
|
||||||
|
|
Loading…
Reference in New Issue