GithubHelp home page GithubHelp logo

macdja38 / pvpcraft Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 10.0 5.34 MB

PvPCraft Discord bot

Home Page: https://bot.pvpcraft.ca

JavaScript 28.35% Dockerfile 0.09% TypeScript 71.56%
bot discord discord-bot hacktoberfest hacktoberfest2021 modular music nodejs typescript

pvpcraft's People

Contributors

macdja38 avatar martacus avatar nihaals avatar p7g avatar rtizzy 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pvpcraft's Issues

Feature Request: Purge command can do messages before a certain time (with relativity), and with keyword

I use an automatic Warframe Alerts feed, but it fills up over time with irrelevant alerts as they expire. There is currently no way to exclusively clear messages before a certain time. Could you add this?

Alternatively or additionally, within the Warframe alerts feed, a way to auto-clear alerts once they expire (get the time they were made, the time left, and once it hits it, it deletes the message) would be much appreciated.

Feature request! [Custom commands]

Just wondering if it is possible for a future update to include the ability for custom commands.

For example;- Users being able to set a command such as "!!kappa" and the bot will show an image that the admin/mods have defined, either via a weblink or uploading said image that corresponds?

Message ID/User ID

Hi!

As we discussed, this is for the addition of the Message ID and User ID in the moderation feeds, such as message deletion.

This would allow for easier tracking.

Thanks a lot!

(Chess Meal Bot) Game Link preview

When an individual pastes in a lichess link for a game it should preview this game. The increment at which the moves are played are arbitrary (in your case jake)

this feature is prevalent for another well known bot and it's usage should be very much of the same as seen here:

image

groupinfo

same thing as userinfo but for groups.

Feature Request: Commands on Timer

I personally use the Warframe commands quite a bit, but it would be cool to have some commands run automatically (like the /sortie or /trader ones) after a certain interval.

chess

chess games must be stored in a database for persistence and preferably able to support cross server games (maybe with voting)

Throwing undefined in eval results in error cannot read property 'toString' of undefined

https://sentry.io/pvpcraft/pvpcraft-bot/issues/422968992/

TypeError: Cannot read property 'toString' of undefined
  File "/docker/pvpcraft/pvpcraft-beta/modules/evaluate.js", line 240, in evaluate.evalCommand
    utils.clean(this._shortenTo(error.toString(), 1800)) +
  File "/docker/pvpcraft/pvpcraft-beta/modules/evaluate.js", line 85, in Object.execute
    return this.evalCommand(command.msg, command);
  File "/docker/pvpcraft/pvpcraft-beta/PvPCraft.js", line 666, in result._commandWrapper
    return command.execute(userCommand)
  File "/docker/pvpcraft/pvpcraft-beta/PvPCraft.js", line 694, in PvPCraft._commandWrapper
    returnValue = await callCommandFunction();
  File "/docker/pvpcraft/pvpcraft-beta/PvPCraft.js", line 665, in PvPCraft.handleCommand
    const result = await this._commandWrapper(command, userCommand, msg, () => {
...
(19 additional frame(s) were not displayed)

TypeError: Cannot read property 'toString' of undefined

Music improvements for large servers

  • separate play permission into search, playlist and link.
  • new permissions allow limiting per person songs in queue.
  • keyword filter for videos, including a node to bypass.
  • Increment per voice channel limit, decrement on leave or start.

Fix / Investigate rift command.

In my discord, usually the command /rift would normally work, and it would show me what rifts are available in warframe
but today when i did /rift

i get this error:

Sorry, there was an error processing your command. The error is
TypeError: Cannot read property 'name' of undefined
reference code 227e0b5ba75d4bc4818b0080852d998a

Report courtesy of 484579736924848128

Moderation log new colours

Current colours are (may not be complete):

  "message.deleted": "#FFB600",
  "message.updated": "#FFFF00",
  "channel.created": "#CC0000",
  "channel.updated": "#CC0000",
  "channel.deleted": "#CC0000",
  "voice.join": "14D5E2",
  "voice.leave": "14D5E2",
  "user": "#111180",
  "member.updated": "#111180",
  "member.added": "#A400A4",
  "member.removed": "#A400A4",
  "member.banned": "#A400A4",
  "member.unbanned": "#A400A4",
  "server.updated": "#FF0000",
  "role.created": "#FF0000",
  "role.updated": "#FF0000",
  "role.deleted": "#FF0000",

Can be found under the feeds module of https://bot.pvpcraft.ca/docs

Help command

Help command should offer a talored output based on the users permissions. something along the lines of

+//init - has the bot join your current voice channel and bind to the text channel the command is used in.
+//play <youtube link> - play a song or playlist
-//destroy - unbinds the bot from the voice channel and deletes  the playlist.

in the code blocks with syntax highlighting diff

Points system

Points system with negative points for spam and bad things, positive points for constructive structured sentences and handing around in voice chats. negative points for jumping in and out of voice chats over and over again.

Translations.

Add an easy way to load translations for modules in diffrerent languges from config files.

Warframe commands fail in dms

https://sentry.io/pvpcraft/pvpcraft-bot/issues/414012904/

TypeError: Cannot read property 'id' of undefined
  File "/docker/pvpcraft/pvpcraft-beta/modules/warframe.js", line 197, in Warframe.getGuildPlatform
    server: guild.id,
  File "/docker/pvpcraft/pvpcraft-beta/modules/warframe.js", line 203, in Warframe.getCommandPlatform
    return this.getGuildPlatform(command.channel.guild);
  File "/docker/pvpcraft/pvpcraft-beta/modules/warframe.js", line 207, in Warframe.getPlatformDependantWorldState
    return this.worldState.get(this.getCommandPlatform(command));
  File "/docker/pvpcraft/pvpcraft-beta/modules/warframe.js", line 504, in Object.execute
    return this.getPlatformDependantWorldState(command).then((state) => {
  File "/docker/pvpcraft/pvpcraft-beta/PvPCraft.js", line 666, in result._commandWrapper
    return command.execute(userCommand)
...
(21 additional frame(s) were not displayed)

TypeError: Cannot read property 'id' of undefined

Possibility to monitor voice.join/voice.leave/voice.switch for just for a specific voice channel

can I do an "/feeds start moderation​.voice​.join" just for an specific voice chanel?
like /feeds start moderation​.voice​.join --chanel RANDOM_VOICE_CHANEL
i'm asking because when I enable "moderation​.voice​.join", for example, the bot start to monitor the entire server. Even without admin hole for him.
Just for understanding the context we was using this feature just to receive the notification when someone join the VOICE_CHANEL. And it was working perfectly cause we had just one channel.

need help

When i start the main.js with node main.js i get the error: SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

Can someone please help me?

(Chess Meal Bot) /player

Checks the fide website for a player.

Usage:
/player fide Magnus Carlsen
Corresponding info should be retrieved from the official website: https://ratings.fide.com/

Subsequently it will show the individuals rating. Preferebly with a screenshot of the profile
image

/player fide top should also be one of the features which shows the top 10 players as implied
image

Another command would include /player lichess (user)
This would allow one to see the profile of a user in a screenshot fashion as well

image

Permissions hard reset option/code

In the event that someone sets up permissions incorrectly there, on occasion is a problem where we cannot identify to what --channel, --user or --role it has been set to and from what we can tell there is no way to manually remove this permission. For example;

{ "191618020571873280": { "g190905185739079680": { "warframe": { "deal": true }

To fix this is it possible to add the option to completely reset all permissions via a command like: //perms set removeall restoring it to the original file which had nothing at all when //perms list is ran.

Thank you 👍

Music module

Bot should probably have the ability to play music because people seem to want that and this would aliviate strain on the failing Sonic Screwdriver.

Warframe Invasions

add a /invasions style command that shows the current warframe invasions.

ReferenceError: urls is not defined

https://sentry.io/organizations/pvpcraft/issues/985011916/?project=186636&referrer=github_plugin

przemyslawpluta/node-youtube-dl#234

ReferenceError: urls is not defined
  File "/docker/pvpcraft/pvpcraft-beta/node_modules/youtube-dl/lib/youtube-dl.js", line 82, in done
    if (passOver && stdout === '' && urls.length > 1) {
  File "child_process.js", line 301, in ChildProcess.exithandler
  File "events.js", line 189, in ChildProcess.emit
  File "domain.js", line 441, in ChildProcess.EventEmitter.emit
  File "internal/child_process.js", line 978, in maybeClose
...
(1 additional frame(s) were not displayed)

ReferenceError: urls is not defined

TypeError: calledOptions.channel.createMessage is not a function

https://sentry.io/pvpcraft/pvpcraft-bot/issues/362931996/

TypeError: calledOptions.channel.createMessage is not a function
  File "/docker/pvpcraft/pvpcraft-beta/lib/MessageSender.js", line 49, in texts.forEach
    calledOptions.channel.createMessage(string + "\nPlease give the bot \"Manage Webhooks\" to enable non fallback functionality").cat {snip}
  File "/docker/pvpcraft/pvpcraft-beta/lib/MessageSender.js", line 48, in _getWebhook.then.catch
    texts.forEach((string) => {
...
(2 additional frame(s) were not displayed)

TypeError: calledOptions.channel.createMessage is not a function

Music improvements

Some things need to be done to get music to where it should be.

  • Better error message on invalid playlists and videos
  • Querry youtube for videos
  • Website to list queue when it's too long.
  • Keep playlists on crash
  • Once server configs are ready disable spam on adding playlists.
  • Better buffer for playlist adding and output
  • Skip all songs queued by a user, auto de-queue on ban.

Proper CI

Automate docker building of images and find a decent way to deploy multiple shards without restarting more than one shard within a 5s period.

FROM node:latest

MAINTAINER Macdja38

RUN echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/sources.list

RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && apt-get clean && npm install -g pm2 && npm install

WORKDIR /docker/pvpcraft/pvpcraft/

CMD ["pm2-docker", "/docker/pvpcraft/pvpcraft/pm2.json"]

Would be great to get @rtizzy 's help on this, Thanks!

Permissions tab never loads

When I have navigated through the servers page to the server I want to configure, the Permissions tab never loads. Eventually it sends me to an authorization page with a "give me administrator" permissions dialog, which I grant. But then the page reloads back to the page as if I just logged in. Going back to the Permissions page again repeats the cycle.

I am a brand new user, trying to use the application for the first time. The only thing I can think of that I did on my part was to uncheck many of the permissions boxes the first time I attempted an invite. But those seem to be preserved in the roles, and I have done what I could think of to reset it. I've tried kicking the bot, removing the role, removing the application authorization I granted it the first time. The permissions page doesn't seem to load for me at all.

Music Bug

Hi,
I found a bug.
Sometime we have a bug, we are obligated to destroy bot.

maxou - Today at 3:45 PM !!play https://www.youtube.com/watch?v=v2AC41dglnM Bot MusicBOT - Today at 3:45 PM Error: Status code 303 Playing GTPlanet - Brakes (less than sign) E-Brake upload by GTE4everyone - Enzo (905 views) [6 Minutes and 1 Second] Enqueued GTPlanet - Brakes (less than sign) E-Brake upload by GTE4everyone - Enzo (905 views) [6 Minutes and 1 Second] currently 0

Best Regards
Quentin

-f for `/play` to add to the start of the queue instead of the end

Adding the flag of -f should insert a song at the beginning of the queue instead of the end.

This is a decent first issue, though knowledge of the rethinkdb api would be a useful pre requisite though the api is decently straight forward if you're at all familiar with .forEach / map style functional constructs and fluent apis.

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.