mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
fix(Discord Node): When using OAuth2 authentication, check if user is a guild member when sending direct message (#9183)
This commit is contained in:
@@ -114,9 +114,9 @@ export function prepareOptions(options: IDataObject, guildId?: string) {
|
||||
return options;
|
||||
}
|
||||
|
||||
export function prepareEmbeds(this: IExecuteFunctions, embeds: IDataObject[], i = 0) {
|
||||
export function prepareEmbeds(this: IExecuteFunctions, embeds: IDataObject[]) {
|
||||
return embeds
|
||||
.map((embed, index) => {
|
||||
.map((embed) => {
|
||||
let embedReturnData: IDataObject = {};
|
||||
|
||||
if (embed.inputMethod === 'json') {
|
||||
@@ -261,7 +261,7 @@ export async function checkAccessToChannel(
|
||||
if (!guildId) {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`Could not fing server for channel with the id ${channelId}`,
|
||||
`Could not find server for channel with the id ${channelId}`,
|
||||
{
|
||||
itemIndex,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user