m-davies / oghma Goto Github PK
View Code? Open in Web Editor NEWRules and references bot for discord d&d groups
License: MIT License
Rules and references bot for discord d&d groups
License: MIT License
See https://discordapp.com/channels/723473275803533323/751189827830939678/751550685262250096. I may also look into opening up this bot myself
Similar to #10 , we need to populate the on_command_error
func to recognize when it's found a command that doesn't exist
Similar to what Rythm does, I'd like the ability for this bot to join a voice chat with a simple command and start playing cinematic music appropriate to the situation. I'm thinking something along the lines of:
?play dungeon | forest | city
) that will force the bot to join the voice channel of the executer and play ambient music of the category specifiedRight now, all the ping does is check if the bot is up. It would be nice if the command was updated to spit out diagnostic infomation and other useful stuff
Describe the bug
Currently, the on_command_error
func doesn't work as intended as we can't send an error stream via an embed. We should recify this to send some sort of output to the user on discord that something has gone wrong
We currently don't see any reference to our aliases in the bot output. When a user executes a command via an aliases, we should inform them that they have.
Discord supports markdown highlighting for small file snippets. We should make use of it and use discord's markdown highlighting instead of the current boring txt
Is your feature request related to a problem? Please describe.
Currently the bot will only return the first matching term and ignores the rest. While this is good for perf reasons, we could do better by adding a new query that will return a list of results and the user can then optimise their query to pick the one that suits it best
Describe the solution you'd like
A new query that will produce a list of results rather than the first one
Describe alternatives you've considered
Using ?searchdir
which while useful, does not filter the results down enough (e.g. it won't help when you're trying to find out all the giants in the database)
Right now, all the commands have limited help text attached to them depending on how much info you offer to the command. However, a generalised help command would be a useful addition as I feel like every bot would need one. This command could offer stuff like:
?help
commandExample case ?searchdir monsters bule
produces the following error
2020-06-05T21:01:44.222508+00:00 app[worker.1]: Traceback (most recent call last):
2020-06-05T21:01:44.222566+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/core.py", line 79, in wrapped
2020-06-05T21:01:44.222567+00:00 app[worker.1]: ret = await coro(*args, **kwargs)
2020-06-05T21:01:44.222597+00:00 app[worker.1]: File "bot.py", line 1336, in searchdir
2020-06-05T21:01:44.222597+00:00 app[worker.1]: await ctx.send(embed=response)
2020-06-05T21:01:44.222627+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/abc.py", line 823, in send
2020-06-05T21:01:44.222627+00:00 app[worker.1]: data = await state.http.send_message(channel.id, content, tts=tts, embed=embed, nonce=nonce)
2020-06-05T21:01:44.222653+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/http.py", line 222, in request
2020-06-05T21:01:44.222654+00:00 app[worker.1]: raise HTTPException(r, data)
2020-06-05T21:01:44.222731+00:00 app[worker.1]: discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
2020-06-05T21:01:44.222731+00:00 app[worker.1]: In embed.fields.2.value: This field is required
2020-06-05T21:01:44.222779+00:00 app[worker.1]:
2020-06-05T21:01:44.222780+00:00 app[worker.1]: The above exception was the direct cause of the following exception:
2020-06-05T21:01:44.222781+00:00 app[worker.1]:
2020-06-05T21:01:44.222819+00:00 app[worker.1]: Traceback (most recent call last):
2020-06-05T21:01:44.222888+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 863, in invoke
2020-06-05T21:01:44.222889+00:00 app[worker.1]: await ctx.command.invoke(ctx)
2020-06-05T21:01:44.222923+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/core.py", line 728, in invoke
2020-06-05T21:01:44.222924+00:00 app[worker.1]: await injected(*ctx.args, **ctx.kwargs)
2020-06-05T21:01:44.222960+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/core.py", line 88, in wrapped
2020-06-05T21:01:44.222961+00:00 app[worker.1]: raise CommandInvokeError(exc) from exc
2020-06-05T21:01:44.223017+00:00 app[worker.1]: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
2020-06-05T21:01:44.223017+00:00 app[worker.1]: In embed.fields.2.value: This field is required
Includes updating of code and references to point to the new repository location
Command prints DONE!
and then exits without sending any response embeds or throwing errors
We do have some limited logging in place but it could be better, especially when an error has been thrown
Need to split this up into multiple files for error handling, commands, commons, etc
Very weird problem with duplicate slash commands. This thread might help?
API queries seem very slow and unreliable. Need to look into it
Currently weapon responses are very small and not detailed
May be possible when parsing the systems reference doc information
Essentially the bot is down due to numerous reasons and I have either been too busy or too ignorant to realise that until now. Therefore, I will attempt to fix the issues and get it up and running again, using this issue to track progress.
Feel free to comment any advice or requests you have for the bot in the meantime, I imagine I'll get some ideas while I'm going through all the shiny new Discord API stuff anyways.
It would be good to have brackets supported on ?roll
so some calculations are completed before others (see BIDMAS explanation)
https://github.com/bagelbits/5e-database has a bunch of other infomation in it that would greatly enhance oghma's knowledge base. It would take a lot of work but I think it be worth it in the end to pull off
Will need to be flexible, use embeds and (if possible) have a history field that shows the most recent dice rolls
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.