noescape00 / discordtipbot Goto Github PK
View Code? Open in Web Editor NEWTipping bot for discord that supports STRAT and other cryptocurrencies
License: GNU General Public License v3.0
Tipping bot for discord that supports STRAT and other cryptocurrencies
License: GNU General Public License v3.0
Suggestion from Bogdanel from the discord, a weekly tipbot lottery. Participants can send 1 Strat once to a lottery during the week. At the end of the week winners are chosen at random from amongst the participants and they receive a share of the Strat. Say, 1st place 60%, 2nd place 30%, 3rd place 10%
Had a couple of people come to me for help with the tipbot because they were copying the commands from help without including "tipbot" at the start. Could be mentioned in the help section?
For security reasons, the message invoking the withdraw command shouldn't stay posted on discord, because everyone can see easily, that per example by searching discord, the user knijia, should have access to a wallet with 324 Strat, and if the user has a big Strat holding, it could be targeted by hackers:
Of course, the user could delete the message, after invoking it, but I think that the tipbot should warranty this somehow, if you decide in the future to use the 2nd suggestion for the issue #13 , it would fit nicely for this purpose.
Thanks, best regards
Add RPC wrapper and configure it to use default stratis mainnet port (add those variables into Settings class).
This will later be used to interact with the node.
Develop a command identical to the chart but with the top 3 users with the most number of quizzes solved, and the number of quizzes.
Add info on how to setup QT, edit settings, example of connection string to SQL db
Create a custom configuration file where each value would have a comment next to it.
Mentioned by Tyler
in the SDF discord:
Bot should mention the user who unvoked deposit
command.
Motivation:
When there are more than one person who called deposit
command in the same chat the bot will answers all of them and user might use wrong deposit address.
When error message is created it should have a countdown on the bottom - 20 sec.
After that time message is deleted.
Add user-friendly error messages for the following scenarios:
Users with admin rights should be able to call bot''s method ShowChartsInThisChannel <frequencyDays = 7>
and StopShowingChartsInThisChannel
Implement an attribute which we will be able to use on every command and supply there help message. Like that:
[Command("withdraw")]
[HelpInfo("Withdraws specified amount of money. Example usage: ....")]
public Task WithdrawAsync(string address, double amount)
{
// TODO
throw new NotImplementedException();
}
Using those attributes we will fork a help message and display it when help command is called.
In the result of the list of all active quizes (listActiveQuizes), add a line for the quiz creator.
Sometimes it is nice knowing who was the creator of the quizz to ask for some tips, engaging more with the community.
New command for the tipbot:
Result: One short IT joke, some examples:
"Programmer.
A machine that turns coffee into code."
"Algorithm.
Word used by programmers when they don't want to explain what they did."
"My software never has bugs.
It just develops random features."
"CAPS LOCK โ Preventing Login Since 1980."
"The code that is the hardest to debug is the code that you know cannot possibly be wrong."
"My attitude isn't bad.
It's in beta."
"Programmer.
A person who fixed a problem that you don't know you have, in a way you don't understand."
"Why use Linux: No Windows, no Gates, no Bill to pay."
"I would love to change the world, but they won't give me the source code."
"Black holes are where God divided by zero."
Simulate discord API request timeout, RPC timeouts, internet failure. Check what throws where and handle those errors appropriately so the bot doesn't shutdown on the first timeout exception.
From discussion with Pharaoh:
"We used to have a fun dumb little feature for tip bot where if you tipped the tipbot, it would make it rain (send tips of 1 Strat amount to random users). So if I tipped tipbot 5 Strat, it would randomly tip 5 people. The problem with that was we'd be potentially tipping inactive users and throwing away money. If there's a way for discord to show active users from inactive users (like Slack) then that feature would be fun
Cool idea. We can get list of users who wrote on stratis discord channel in the past 24h and randomly select from them. Potentially even add option to the user of this command to select only from those that are online atm."
When using the makeitRain command, it is possible for one person to win multiple times.
The quizcreator shouldn't be able to solve quizes created by himself.
In the result message of the answerquiz command there is the indication of the quiz creator, by knowing who is the creator, the tipbot should exclude automatically quizes created by the user, of the active quizes, when the user uses the answerQuiz command.
Implement CreateQuizAsync and AnswerQuizAsync
CreateQuizAsync - user will be able to ask a question and supply hash of the answer. User will specify reward amount and time the quiz will hold. First to give an answer which hash is equal to hash supplied in the quiz creation will get the money.
Without mentioning the person on discord of course.
Oh and it's "quizzes" not quizes. ๐
Would be nice to see who solved a quiz and what the correct answer was, rather than delete the message?
Hello,
Great work indeed. I appreciate the hard work done by you. I am looking for similar tip bot with STEEM coins since steem has large userbase on discord. I can help with the configuration of steem nodes and address creation. Might create a PR if you agree.
PS : did you know you can be rewarded by utopian.io for your open source work with STEEM ? Check out https://www.utopian.io and https://steemit.com/@utopian-io.
You can create a steem account for as low as $2.50 at https://www.swapsteem.online
Hello noescape00, i'm msssss, from the Stratis Discord, hope you don't mind that i post here some suggestions and hopefully some bugs about the Discord tipbot you developed.
Some users warned me about being possible to see the salted hash when the StartQuiz command is posted, that doesn't seem alright, there should be a better solution, rather than having to manually delete the command, some possible workarounds:
1 - Just accept the StartQuiz command from a direct message of the user to the tipbot (It's possible right? ), and it would be the tipbot to post automatically the quiz in the Tipping section;
2 - The tipbot could remove automatically the message from the user that ordered the StartQuiz (It's possible to do that by making the tipbot a moderator?).
Thanks, best regards
dont put all the logs in one file- separate by classes or namespaces.
Also create a log that will have everything higher than trace
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.