Code Monkey home page Code Monkey logo

canti-bot's Introduction

canti-bot's People

Contributors

brod8362 avatar scala-steward avatar scoreunder avatar winteryfox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

canti-bot's Issues

Persist in-progress votes in voice kick command

The voice kick command does not persist in-progress votes. They should be persisted to the database so that on restart, the bot can do one of the following:

  • Restore them to full functionality (allowing people to vote again)
    • This would still leave a period of non-functionality while the bot is restarting
  • OR, close all votes
    • Closing it earlier (on shutdown) would delay shutdown waiting on API, which is something I want to avoid as much as possible

Relates to #2

Add mobile-friendly &find command

Mobile Discord's copy-and-paste feature is awful. So I thought maybe there should be a copy of &find that puts each ID in its own message, to work around the difficulties this causes. Or maybe allow reacting to &find with a number to put the ID in the message.

Add channel manipulation commands

Allow a user to modify channels they own with commands like:

  • &voice name Hangout 2 to change name
  • &voice perm locked to turn a channel private
    etc.

I was considering:

  1. a command for name changes
  2. a command for permission changes
  3. a command for uninviting, maybe?

They could all be grouped as subcommands under one bigger &voice command, allowing users who created a voice channel to admin it even if they don't have 2 factor authentication enabled.

removeTemporaryVoiceBan: avoid error if channel is deleted

Relates to #2.

We should either avoid passing around old VoiceChannel objects through scheduled futures (instead pass the ID and .find it), or we should recover silently from the potential Error(UNKNOWN_OVERRIDE | UNKNOWN_CHANNEL) in the call to tryRequest.

Create voice kick command

&voicekick: kick a user from voice chat (calling a vote if necessary).

If the voice chat is a private channel (or public-but-temporary channel - see #1), and the owner runs this command, it should work no questions asked. Otherwise, it should call a vote with the existing users in the voice chat.

If there is a guild AFK channel specified, this command must not work in it.

If there are some users in the voice channel who are eligible to vote but who cannot see the channel with the votekick in it, then the command must fail.

If the person is kicked, they also get a permission override on the channel denying them connection privileges. This override is removed after 10 minutes have elapsed.

How the vote works:

  • To vote you must satisfy these criteria:
    • Be in the voice channel right now
    • Have been in the voice channel when the vote was started
    • Have been un-deafened when the vote was started
    • Not be the user that is targeted by the command
  • If the channel owner votes, their decision is final and overriding.
  • The vote ends when the owner votes, or when a majority of eligible users have voted one way or the other, or when it times out (described later).
  • The person who called the votekick automatically has a single "kick" vote in their name against the person they are trying to get kicked, so they don't need to vote.
  • You can vote "abstain", "kick" or "stay", and the user is kicked if "kick" gets the majority of non-abstain votes and the poll did not time out. A vote of "abstain" excludes you from the tally entirely.
  • The vote ends after 3 minutes without kicking the user if the votes for "kick" did not exceed the halfway threshold.

When the vote starts, everybody eligible to vote is pinged.

Abbreviate long embed descriptions in &quote

If an embed description (e.g. video description) has a lot of newlines in it or is very wide, it should be truncated to avoid taking up too much space.

There probably needs to be some way to differentiate legitimately long quotes (e.g. quoted tatsumaki mail) from quotes which don't appear long to the end user (as above, video descriptions), and adjust parameters differently for each.

Create public voice chat command

&public command: like &private, except the channel it creates is open by default.

Does not need to interact with the invites system in any special way, and should not create user-limited channels.

Bug: Users moved into full or private VCs can't hear anything

It also happens with private voice channels that don't necessarily have a user limit. It only happens to some people, but it always happens to the same people. My guess is it might have to do with some permission conflict or 2FA? It's a very weird bug but it's super annoying when it happens.

Two reports in a big server:

imagen

imagen

More context:

  • If the person enters the VC on their own, the issue is not present
  • If the bot moves the person into the VC, the issue is present

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.