Open bonald opened 5 years ago
to remove "undefined" when attachment is posted without a comment, add this code:
if (attachArray.length > 0) {
...
if (message.content && message.content != '') {
post_data.content += '\n' + attach.url;
} else {
post_data.content = '\n' + attach.url;
}
Wanna submit PR? :)
does this not work anymore? im getting this;
`node:internal/modules/cjs/loader:1170 throw err; ^
SyntaxError: C:\Users*USER*\OneDrive\Desktop\discord-selfrelay-master\auth.json: Unexpected token # in JSON at position 234
at parse (
Consider it abandoned - I don't have the means to test this now and have not touched it in a very long time. That said your error is probably because there's a comment in the json file - json doesn't support comments.
1- Some embed contains footer with source channel info. To remove it add this code: if (embed['footer']) delete embed['footer'];
2- Some message contain mentions like @user-role. If user role is not in the destination server, the @deleted-role appears. To remove mention from message add this code: