start-again / spookybot Goto Github PK
View Code? Open in Web Editor NEW๐ A spooky Discord bot
License: MIT License
๐ A spooky Discord bot
License: MIT License
Hi!
Can I work on this for the Spanish language?
Originally posted by @mgomez08 in LucasCtrl/SpookyBot#10 (comment)
Is your feature request related to a problem? Please describe.
I wanted to add a Spanish language file copying the English words to Spanish
Describe the solution you'd like
I added a Spanish file, with the addition of some extra words that also have the same meaning.
Teachability, Documentation, Adoption, Migration Strategy
It looks like just adding the file will allow it work one the PR is merged
Feature Extension of the Halloween Bot Scare (HBS)
Currently the bot joins the voice channel and plays a sound and leaves the channel. In order to not interrupt the bot while playing a sound we need a queue for the requested scares.
Details
If the bot joins a channel (first in queue), it plays the sound and joins the next queued participant in order to play his scary sounds in that channel. If the queue is completed the bot leaves the voice-communication and idles and waits for new victims.
Improvement of message rendering, modification of the bot <-> user interaction system, improvement of the setlang
command to make it more understandable.
Details
This issue is for information purposes only, please refer to the branch.
I suggest adding a command (<prefix> meme
) which posts a random picture from r/spooktober.
Is your feature request related to a problem? Please describe.
Making the prefix configurable allows the server admin to personalize it.
Describe the solution you'd like
Store the prefix in the database per server. If no prefix is configured, use the default one. Validate the prefix for the format prefixName!
.
Describe alternatives you've considered
None ๐ค
Teachability, Documentation, Adoption, Migration Strategy
config: {
command: 'setprefix',
name: 'Set bot prefix',
description: 'Change the default bot prefix',
usage: `${prefix}setprefix <prefix>`,
displayHelp: true,
permissionNeeded: 'ADMINISTRATOR',
},
The entire bot is currently deployed by hand.
To reduce the entire workflow and make it easier to enable new features we are planning to bring everything together into a docker environment incl. github actions
This will be released soon! :-)
It might be nice to get the bot to react to messages when someone is mentioned.
Details
The robot should react to the message when a person is mentioned. However, the username of the person on the server must contain spooky
.
It is also necessary to be careful that it is not the person's tag but his username that is taken into consideration.
e.g.: LucasAlt#7887 is my tag but my username on some servers is SpookyAlt
Describe the solution you'd like
To avoid having to create several objects for the same emoji, why not use an array containing all the words?
New translation file structure
Before:
{
name: 'halloween',
emoji: '๐',
},
{
name: 'pumpkin',
emoji: '๐',
}
After:
{
name: ['halloween', 'pumpkin'],
emoji: '๐',
}
Is your feature request related to a problem? Please describe.
One thing that might become a problem in combination with #10 and #12 is that people for different languages add new emojis in a different language file and order.
For example the https://github.com/LucasCtrl/spookyBot/blob/main/lang/en.js is missing the "Muerte" emoji from https://github.com/LucasCtrl/spookyBot/blob/main/lang/es.js
--> The English template file does not contain all possible halloweenish emojis from all language files so it makes life a little bit harder for people to keep track and who just want to add translations instead of searching for new emojis. The problem complexity increases with more languages and emojis being added... As long as there are not that many items it is probably doable for the person accepting a pull request to merge the changes back into the English template file but in the meantime other people might have added a new language and did work on an old template.
Describe the solution you'd like
So maybe it is a good idea to decouple the language files from the emojis and just use them for translations and maybe synonyms.
For example somebody could first search for a lot of halloweenish emojis, add them to a template and add a unique word/term to it which can be referenced uniquely in language files or maybe directly use the term as a filename for synonyms/translations and using a folder, e.g. "lang/en" for synonms, "lang/fr" for French translations, "lang/de" for "German", ... .
In a file lang/emojis,js you could then store the emojis + a unique word that describes each emoji, currently possible language and maybe have a tool that generates empty template files (e.g. in JSON format) for each possible language - or just have a folder with empty templates that can be copied directly, so e.g. for the "zombie" emoji it would generate a file called "zombie.json" in each of the language folders, so the structure then would look like this:
lang/
lang/_languagefiles_templates/candy.json
lang/_languagefiles_templates/zombie.json
lang/de/candy.json
lang/de/zombie.json
lang/en/candy.json
lang/en/zombie.json
lang/fr/candy.json
lang/fr/zombie.json
lang/nl/candy.json
lang/nl/zombie.json
[...]
And people would just need to fill in translations or for English just synonyms. If a template file is not filled with data it does not get used by the application in that language. (My assumption there is though that there are less emojis for Halloween to use than possible languages in which the discord bot will be adopted in.)
If programmed dynamically it could also easily be possible to based on the folder structure just adding a new language by adding a new folder with those files
Describe alternatives you've considered
Instead of using the above mentioned solution with different folders and individual files it might just be easier to use one translation file for each language (sort of a mini dictionary for mapping the unique term to synonyms and translations).
An alternative solution for solving the problem without a lot of manual merging work is to create an issue in which somebody pre-fills the English template with a lot of potentially Halloween emojis so that people start with (nearly) all the emojis right away and not worry with merging overhead in the future.
Teachability, Documentation, Adoption, Migration Strategy
If you can, explain how users will be able to use this and possibly write out a version the docs.
Maybe a screenshot or design?
Feature Extension of the Halloween Bot Scare (HBS)
Currently you can spam the command as often as you want. In order to prevent spamming we want to have an anti-spam protection. The protection should prevent a single user from using the command too often in a configurable time span.
Details
The bot remembers who requested a scare request and has a configurable time duration how long and how often a user can get the bot into the channel.
If the user exceeds that limit the bot simpy ingores that user command.
Is your feature request related to a problem? Please describe.
Consistent environment deployments or execution by adding Docker.
Describe the solution you'd like
Dockerizing the project.
Is your feature request related to a problem? Please describe.
I would like to add support for the Dutch language
Describe the solution you'd like
Adding a nl.js file with the necessary words should do the trick.
Teachability, Documentation, Adoption, Migration Strategy
It should automatically work
Is your feature request related to a problem? Please describe.
The bot reacts to the command boo!booh and joins your current voice channel and plays randomly a sound to scare you and your companions in the channel. A real laughter for everyone who is present in the channel! There is for the MVP Feature no spam protection nor queuing implemented.
Describe the solution you'd like
The MVP is already implemented. The command is added and the behaviour is also present.
Describe alternatives you've considered
As extensions which would be good #hacktoberfest issues:
Create a queue for the Bot
Create a anti-spam protection (each user can use it max 3 times in 10 minutes i.e.)
Create an interface to upload custom sounds to the Bot
Teachability, Documentation, Adoption, Migration Strategy
The use is with a special command ${prefix}!booh - after that the bot joins the voice channel you are currently present in and plays a sound. After the playback is finished the bot disappeared like a ghost! ๐ป
Current Behavior
In a translation file, multi-part words are not taken into account.
e.g.: "abend vor allerheiligen" will not be detected
Possible Solution
Change the operating principle of the filter. For the moment, the message is split after each space. Then the different words are compared against the words in the translation file.
Could I contribute to this project?
I would like to add a command that calculates the amount of time you have to wait for a PR to be matured when given a PR start date.
I am also open to coding whatever commands you need.
Current Behavior
yarn start
outputs the following error:
yarn run v1.22.4
$ node code.js
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module '/app/code.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Possible Solution
https://github.com/LucasCtrl/spookyBot/blob/703622101188836e0ed6d11ca445e5eeddc2b373/package.json#L23
This should be core.js
instead of code.js
Feature Extension of the Halloween Bot Scare (HBS)
Currently the bot sends you a message if you are not present in a voice channel. This message remains in the channel forever.
Details
If you request the bot to scare you and your companions and you are not present in a voice channel it is writing you a reply message. This reply message should be deleted after a configurable time in order to prevent the bot from spamming a discord channel.
Edit:
The message can also be used as a DM instead of a global present message. (as suggested by @ALMerrill )
Is your feature request related to a problem? Please describe.
It would be nice to be able to use several languages on the same server.
e.g.: French, English and Spanish language
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.