Giter Club home page Giter Club logo

discord-ban-appeals's People

Contributors

dependabot[bot] avatar dougley avatar jackwellerreal avatar karashiiro avatar sylveon avatar yoggys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

discord-ban-appeals's Issues

chat

Is it possible to talk on discord with the user thanks to the bot?

Custom Domains Error

In the sign in process, an error shows up saying "Invalid URI", I know, The URI needs to be set as the website url thing, but how do i edit that on github?

Error after signing in

I don't know if I am doing anything wrong here but after signing in to discord, I get the message

{"errorType":"Error","errorMessage":"Failed to get user access token","trace":["Error: Failed to get user access token"," at Runtime.exports.handler (/var/task/src/func/oauth-callback.js:27:19)"," at processTicksAndRejections (internal/process/task_queues.js:97:5)"]}

This is on a fresh install with no changes being made to source code. Where should I start to troubleshoot this? Does the GitHub repo need to have the same name as the parent repo?

Collect user's email

Add option to collect also user's email from Discord oauth. Then staff will be able to reply to the appeal to user's email. Replying to email is better for staff than sending friend requests and waiting for approval ...

help

{"errorType":"Error","errorMessage":"Failed to get user ban","trace":["Error: Failed to get user ban"," at getBan (/var/task/func/helpers/user-helpers.js:41:15)"," at processTicksAndRejections (internal/process/task_queues.js:95:5)"," at async Runtime.exports.handler (/var/task/func/oauth-callback.js:44:25)"]}

Automatically add people back to the server after unbanning them

Hi, this is a suggestion/question. I have some experience in JS, but not a lot and I'm still pretty inexperienced with some aspects of the Discord API.

I've tried modifying the appeal form so that once unbanned a user would be automatically readded to the server. I've changed the bot scope to request guild join as well and I've made the following fuctions in https://github.com/sylveon/discord-ban-appeals/blob/master/func/helpers/user-helpers.js:

function callGuildJoinApi(userId, guildId, botToken, method) {
    return fetch(`${API_ENDPOINT}/guilds/${encodeURIComponent(guildId)}/members/${encodeURIComponent(userId)}`, {
        method: method,
        headers: {
            "Authorization": `Bot ${botToken}`,
            "Content-Type": "application/json",
        }
    });
}

async function guildJoin(userId, guildId, botToken) {
    const result = await callGuildJoinApi(userId, guildId, botToken, "PUT");

    if (!result.ok && result.status !== 404) {
        console.log(await result.json());
        throw new Error("Failed to add user to the server.");
    }
}

module.exports = { getUserInfo, getBan, unbanUser, guildJoin };

So I tried adding the function on the unban function to also call the guildJoin function which is https://discord.com/developers/docs/resources/guild#add-guild-member

I tested the PUT/guilds/{guild.id}/members/{user.id} in POSTMAN but it requires access_token which I don't know how to get (or what's it for) and the application gives an error. Is this the application access token for the person that submitted the appeal?

This is the error I get on the console when running via netlify:
1:33:52 PM: bbc7e98c INFO { message: '400: Bad Request', code: 0 }

This is the error I get when testing the PUT request directly:
{
"message": "Invalid OAuth2 access token",
"code": 50025
}

Is this something that's possible to do, while still remaining on a free tier?

Suggestion: Auto block feature

I guess we are all aware of the increasing phishing attacks discord servers are getting, personally, I have no intention of letting those people that fell for the scam come back.

My idea is to be able to configure a variable or something that the bot checks when the user appeals and if the ban reason contains such word or string (e.g "ToS", "break ToS", "no appeal", "definitive"...) the user will not be able to appeal the ban.

Option to use just webhook

Add option to use just Discord webhook for receiving ban appeals. This would be good for those who don't need to have unban option and dont need bot.

Followed setup guide but getting JSON script after logging in.

{"errorType":"Error","errorMessage":"Must use import to load ES Module: /var/task/node_modules/node-fetch/src/index.js\nrequire() of ES modules is not supported.\nrequire() of /var/task/node_modules/node-fetch/src/index.js from /var/task/func/oauth-callback.js is an ES module file as it is a .js file whose nearest parent package.json contains \"type\": \"module\" which defines all .js files in that package scope as ES modules.\nInstead rename index.js to end in .cjs, change the requiring code to use import(), or remove \"type\": \"module\" from /var/task/node_modules/node-fetch/package.json.\n","trace":["Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /var/task/node_modules/node-fetch/src/index.js","require() of ES modules is not supported.","require() of /var/task/node_modules/node-fetch/src/index.js from /var/task/func/oauth-callback.js is an ES module file as it is a .js file whose nearest parent package.json contains \"type\": \"module\" which defines all .js files in that package scope as ES modules.","Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove \"type\": \"module\" from /var/task/node_modules/node-fetch/package.json.",""," at new NodeError (internal/errors.js:322:7)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:1102:13)"," at Module.load (internal/modules/cjs/loader.js:950:32)"," at Function.Module._load (internal/modules/cjs/loader.js:790:12)"," at Module.require (internal/modules/cjs/loader.js:974:19)"," at require (internal/modules/cjs/helpers.js:93:18)"," at Object.<anonymous> (/var/task/func/oauth-callback.js:1:15)"," at Module._compile (internal/modules/cjs/loader.js:1085:14)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)"," at Module.load (internal/modules/cjs/loader.js:950:32)"]}

Selfhosting

Hi, I was wondering if there was a way to selfhost this rather than on netlify?

Feature Suggestions

I have 3 suggestions:

  • Use a captcha service to prevent spam
  • Make the message send a message in a channel that includes a button interaction. When the button is pressed, the user is unbanned
  • When a user is unbanned by a moderator (by pressing the button), the bot uses the guilds.join scope to add the user to the server.

Make form page custiomizable.

I am unable to write my own css since it will only stick to the bootstrap css you have made, if I deleted the link rel in the head, the page will break. Is there a possible way to keep the current css you have made and also allow myself to make changes to style.css.

Bypass Ban Checking

Hey, so I customized my form but I don't know javascript. How do I make it bypass the ban checking and just let me go to the form like the example you put on this repo's description because I'm getting a 404 error, might be because I deleted the error.html file since I don't need it.

Redirect URL error

now, i have a domain, pogisle-unban.tk, what should be the redirect URL? i already deployed the website to that domain

Getting this error

{"errorType":"Error","errorMessage":"Failed to submit message","trace":["Error: Failed to submit message"," at Runtime.exports.handler (/var/task/func/submit-appeal.js:105:19)"," at processTicksAndRejections (internal/process/task_queues.js:97:5)"]}

bot is offline

Hi after following all the steps the bot is offline and is not working how do i rectify this issue

Escape markdown from user input

User input is currently passed as is to the webhook, which means the user can use markdown - we should probably at least escape the link syntax, and leave formatting stuff alone.

Error

When I click authorize it redirects me back and then I receive:

{"errorType":"Error","errorMessage":"Failed to get user access token","trace":["Error: Failed to get user access token","    at Runtime.exports.handler (/var/task/src/func/oauth-callback.js:30:19)","    at processTicksAndRejections (internal/process/task_queues.js:97:5)"]}

How to add more text fields?

I managed to customize the site, but how do I duplicate the question fields and still make it send to the embed?

Submit appeal form error message

Hi, out of the blue users are unable to submit appeals on my server.

I have forked this repo and just translated some things to have it in Spanish, last week it was working just fine.

Now whenever they try to send the form (after logging in) they receive this message:

{"errorType":"SyntaxError","errorMessage":"Unexpected token ] in JSON at position 44","trace":["SyntaxError: Unexpected token ] in JSON at position 44"," at JSON.parse (<anonymous>)"," at Runtime.exports.handler (/var/task/func/submit-appeal.js:37:35)"," at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"]}

I tried to check if there was an error in the code, but I can't find the file submit-appeal.js and I don't know what to do.

Custom appeal questions

Please add option to setup custom ban appeal questions, you should create questions.json where these questions will be.

I get this error

I get this error: Not Found - Request ID: 01G0YRB0H9VEF4E5GZXQ0R5T7Y

DM Message

Is there anyway for the bot to DM people when there ban? To send them the link

I'm getting this error

I'm getting this error

{"errorType":"Error","errorMessage":"Failed to get user ban","trace":["Error: Failed to get user ban"," at getBan (/var/task/src/func/helpers/user-helpers.js:41:15)"," at processTicksAndRejections (internal/process/task_queues.js:97:5)"," at async Runtime.exports.handler (/var/task/src/func/oauth-callback.js:35:25)"]}

Another error

You don't have authorisation to view this page.
HTTP ERROR 403

site is unsafe

if i try to connect my discord on the site it says website is unsafe it there a way that you can not see that anymore

Unknown error after submitting the ban appeal.

Hey so I have followed all setup steps listed however when I click the submit button on the ban appeal i get this error message:

{"errorType":"Error","errorMessage":"Failed to submit message","trace":["Error: Failed to submit message"," at Runtime.handler (/var/task/func/submit-appeal.js:8530:13)"," at processTicksAndRejections (internal/process/task_queues.js:95:5)"]}

Any ideas, everything else works fine however the appeal never gets sent due to that error

Bot not online and denied to access site

Hello, the discord bot isn't going online and when I login to discord with my alt its says "your access to this site is denied" + no one is blocked (http error 403)

Bot error

{"errorType":"Error","errorMessage":"Dynamic require of "buffer" is not supported","trace":["Error: Dynamic require of "buffer" is not supported"," at __require (file:///var/task/func/oauth-callback.js:11:9)"," at node_modules/safe-buffer/index.js (file:///var/task/func/oauth-callback.js:4404:18)"," at __require2 (file:///var/task/func/oauth-callback.js:17:44)"," at node_modules/jws/lib/sign-stream.js (file:///var/task/func/oauth-callback.js:4935:19)"," at __require2 (file:///var/task/func/oauth-callback.js:17:44)"," at node_modules/jws/index.js (file:///var/task/func/oauth-callback.js:5115:22)"," at __require2 (file:///var/task/func/oauth-callback.js:17:44)"," at node_modules/jsonwebtoken/decode.js (file:///var/task/func/oauth-callback.js:5148:15)"," at __require2 (file:///var/task/func/oauth-callback.js:17:44)"," at node_modules/jsonwebtoken/index.js (file:///var/task/func/oauth-callback.js:7205:15)"]}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.