GithubHelp home page GithubHelp logo

graham_discord_bot's People

Contributors

artombado avatar bbedward avatar kirby1997 avatar majicgit avatar mconstant avatar plasmapower avatar renesq avatar slightlyskepticalpotat 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graham_discord_bot's Issues

Change Giveaway's name to lottery

Giveaway is free, without any entry fee, so it should be called lottery because lotteries have an entry fee.

Or create a real giveaway by removing entry fee function.

Add support for graphene based coins like STEEM and BTS

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

QOL Improve Copy and Pasting of address from .wfu command

https://github.com/bbedward/Graham_Nano_Tip_Bot/blob/master/bot.py#L1962

Instead of separating items {2} and {3} with a space I feel like they should be separated by a new line. Unless the Discord window is very large, these items are not displayed on the same line usually. This results in it being too easy to copy the space that follows the address as it is very small and hard to notice. This can be annoying when trying to copy and paste the address and forgetting.

annoying space

Single codebase for banano/nano

There's really no need for two separate codebases.

We can just add a setting for banano, then for banano we use different raw conversions and aliases, block explorers, etc

The arrest/mute type of functionality should be moved to Beatrice

No list of library dependencies

I have this issue.
File "bot.py", line 20, in <module> import wallet File "/home/gfosu1997/graham/wallet.py", line 2, in <module> import db File "/home/gfosu1997/graham/db.py", line 59, in <module> db = PooledPostgresqlExtDatabase(settings.database, user=settings.database_user, password=settings.database_pas sword, host='localhost', port=5432, max_connections=16) TypeError: 'NoneType' object is not callable
I'm thinking I probably have installed a different version of peewee from what you use to create this bot. A list of dependencies in the doc would really help myself and others or just adding the versions you have to the repo itself. I'm not sure if this repository is still being maintained but I would appreciate anyone who could get back to me on this.

Websocket closed with 4014, cannot reconnect

I'm trying to run the bot on Ubuntu 20.04 and I can't get it to work.

python3.7 bot.py
INFO:root:Initializing database
INFO:root:Using SQLite database dev.db
INFO:tortoise:Tortoise-ORM startup
connections: {'default': {'engine': 'tortoise.backends.sqlite', 'credentials': {'journal_mode': 'WAL', 'journal_size_limit': 16384, 'file_path': 'dev.db'}}}
apps: {'db': {'models': ['db.models.user', 'db.models.account', 'db.models.stats', 'db.models.transaction', 'db.models.muted', 'db.models.favorite', 'db.models.giveaway'], 'default_connection': 'default'}}
INFO:root:Graham server running at 127.0.0.1:11337
INFO:discord.client:logging in using static token
INFO:root:Re-queue task started
INFO:discord.gateway:Shard ID None has sent the IDENTIFY payload.
INFO:discord.gateway:Websocket closed with 4014, cannot reconnect.

Bot made me in 4.6k banano debt

image
I withdrew 7.5k (still didn't went through) few days ago.
Can you get me out of debt? Thanks
imalfect#7015
id: 852640730093453372

Make the Bot "public"

By making the bot public, you would allow people to invite the bot to more Discord servers.
While spinning up a VM and a DB isn't "rocket science", it still is a significant barrier of entry for community managers who just want to find an easy solution to "tipping users for good content".

This would improve Nano's user adoption significantly.

Make database asynchronous

This requires 2 things

  1. switching from sqlite to preferably postgres

  2. Using an asynchronous database adapter like asyncpg or aiopg. Maintaining peewee as ORM preferable if possible

Expand test coverage

Need to add test coverage for all parts of the codebase.

  • Test utilities
  • Test db
  • Test cogs
  • Test rpc
  • Test tasks/tx queue

Understanding the behavior of the bot

I have taken this codebase as the starting point for a Bitshares tipbot.

I am having some problems answering some questions about how the code behaves. Could I possibly tip you $10.00 per question? Alternatively, I could document the code so that other developers can understand how it functions. To faciliate this:

  1. What is your decision on using Common Python Standards to format the code. There is no sense in me contributing patches to the functions until we come to agreement on this?
  2. Would you accept the friend request from princepawn on Discord so we can discuss this there?

triple tip worked, but only last tip got emojis.

i did .ban, saw no response emojis.
did .ban again, no response emojis.
did .ban a third time, only the third one got check marks.
but all three went through.

I deleted the posts since they were spam in the tahiti channel. I'm not sure if deleting them had anything to do with it, as I waited a while (2 minutes) before deleting them.

Update SQL utilities for postgres

It's kinda nice to be able to see how many transactions are sitting unprocessed and all the old sqlite utilities and scripts are now obsolete.

I think new ones would be best to be written in python and utilize the DB settings in settings.py

Active users? Feature add!

.banrandom & .brain both claim to send a tip to "active member(s)" Hpow do you know who ise an active member?

I have seen how on other servers there is a time limit to who is considered "active", and have myself been dropped from "active" status when I was didn't respond to the current conversation because it didn't involve me or anything I cared about.

Add a "Whos is active" command "Or other such meth0d to inform people they might not be considered active, anymore.

Redesign database schema for future

The database schema is sloppy and was hacked together as features were added.

Some things that need to be considered

  1. Old schema needs to be migratable to new schema

  2. Separate stats and accounts into their own tables. Accounts should be a one-to-one relationship with the users table and stats should be a one-to-many relationship - reason being in point #4

  3. Any ID from discord is an integer and those fields need to be changed to Integer fields. Discord IDs also need to be primary keys where applicable

  4. Server-specific stuff. For future scaling options we need to make stats server specific. Attaching a server ID to the new stats table should be sufficient.

Probably more stuff

Make transaction processing more scalable

This has a couple of main components

  1. Moving RPC send and receive actions to a separate process. Investigate using persistent queues to communicate between processes. In current setup the secondary process should not interact with the database at all due to multi write limitations of sqlite. It should be strictly for work/send/receiving and should communicate the results back to the main process which would then update our database.

This would increase thoroughput quite dramatically due to limitations with python threading and the GIL

  1. Figure a way to separate work_generate from the send/receive action and distribute among multiple peers. This is a little tricky as there's so much activity the frontiers frequently change.

Reformat code to be PEP-8 Compliant.

Hello, I noticed this is your first code in Python and Discord. It is very impressive. I don't know how you feel about this, but the standard coding guidelines for Python are outlined in PEP-8.

I was successful in reformatting the code automatically using autopep8 and this command line:

autopep8 --in-place --aggressive --aggressive

And then changing to the util directory and doing the same.

Usernames are not escaped (in tip notification)

Here is notification screenshot:

sample

It seems that user have ' in his name, which had not been encoded, and Discord received it as formatting char. Not sure how powerful is message formatting in Discord and what negative result can "smart" username lead to, but this is still kind of injection bug.

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.