Comments (20)
@bot.command()
async def paginate(ctx):
embed1 = discord.Embed(color=ctx.author.color).add_field(name="Example", value="Page 1")
embed2 = discord.Embed(color=ctx.author.color).add_field(name="Example", value="Page 2")
embed3 = discord.Embed(color=ctx.author.color).add_field(name="Example", value="Page 3")
paginator = DiscordUtils.Pagination.CustomEmbedPaginator(ctx)
paginator.add_reaction('⏮️', "first")
paginator.add_reaction('⏪', "back")
paginator.add_reaction('🔐', "lock")
paginator.add_reaction('⏩', "next")
paginator.add_reaction('⏭️', "last")
embeds = [embed1, embed2, embed3]
await paginator.run(embeds)
from discordutils.
no error on the console. but the command did not return anything. maybe it has to do with bot permissions ? I already asked this but didn't get a serious response
Do you have an error handler that raises the errors for you?
in case you dont:
@bot.event
async def on_command_error(ctx, error):
raise error
from discordutils.
More specific I tried the paginate
commands
from discordutils.
It works for me
from discordutils.
Yeah, well, this ain't helping me. You build the library. Maybe some help here ?
Are there any special permissions my bot has to have ? I gave read/write and read history permissions, and reaction permisions
from discordutils.
Yeah, well, this ain't helping me. You build the library. Maybe some help here ?
Are there any special permissions my bot has to have ? I gave read/write and read history permissions, and reaction permisions
Just because you use someone's code does not mean you are entitled to support. Post your code, and pray some person with time on their hands will be willing to help you.
from discordutils.
Well, the code is taken from the examples as I already mentioned. Besides that, you 2 had the time being rude but haven't the time to help? This is an open source project isn't it? Shame on both of you @MiyakoYakota @toxicrecker
from discordutils.
Well, the code is taken from the examples as I already mentioned. Besides that, you 2 had the time being rude but haven't the time to help? This is an open source project isn't it? Shame on both of you @MiyakoYakota @toxicrecker
Again, post your code, and hope someone will help you.
from discordutils.
Again, my code is the Project's examples. Never mind
from discordutils.
Again, my code is the Project's examples. Never mind
The samples work fine. You are doing something wrong. Post your code, last time I will attempt.
from discordutils.
@bot.command() async def paginate(ctx): embed1 = discord.Embed(color=ctx.author.color).add_field(name="Example", value="Page 1") embed2 = discord.Embed(color=ctx.author.color).add_field(name="Example", value="Page 2") embed3 = discord.Embed(color=ctx.author.color).add_field(name="Example", value="Page 3") paginator = DiscordUtils.Pagination.CustomEmbedPaginator(ctx) paginator.add_reaction('⏮️', "first") paginator.add_reaction('⏪', "back") paginator.add_reaction('🔐', "lock") paginator.add_reaction('⏩', "next") paginator.add_reaction('⏭️', "last") embeds = [embed1, embed2, embed3] await paginator.run(embeds)
Can you show us what error you had while using that code?
from discordutils.
no error on the console. but the command did not return anything. maybe it has to do with bot permissions ? I already asked this but didn't get a serious response
from discordutils.
no error on the console. but the command did not return anything. maybe it has to do with bot permissions ? I already asked this but didn't get a serious response
Then what permissions did your bot have? since it would need embed links permission to send the embed
from discordutils.
no error on the console. but the command did not return anything. maybe it has to do with bot permissions ? I already asked this but didn't get a serious response
Do you have an error handler that raises the errors for you?
in case you dont:@bot.event async def on_command_error(ctx, error): raise error
This is a rather useless error handler. If the user hasn't overridden the default provided on_command_error
, and there was an error, it'd be printed to the console
The only way that errors would be getting suppressed would be if they had faulty error handler; one which handled only a few cases and silently ignored the rest, like:
@bot.event
async def on_command_error(ctx, error):
if isinstance(error, ...):
# does something
And the correct way would be....
@bot.event
async def on_command_error(ctx, error):
if isinstance(error, ...):
# does something
raise error # this makes sure that you re-raise any errors that you weren't planning on handling
from discordutils.
Did you install all requirements for discord.py[voice]
$ sudo apt install libffi-dev python3-dev
$ pip3 install PyNaCl
$ pip3 install DiscordUtils
I have also put in a PR to remove this requirement #25 in which this issue (if it is what you're having) will no longer need those additional requirements
from discordutils.
I did not install pynacl nor libffi-dev
from discordutils.
I did not install pynacl nor libffi-dev
That'll be the issue 😄
You can either install those dependencies, or if you are unable to you can use my branch while waiting for #25 to be approved with
$ pip install git+https://github.com/KoalaBotUK/DiscordUtils
This will remove Music functionality, but others will work fine
glad to help 👍
from discordutils.
There is no reason to install a voice library to make a pagination work. I still think it is a permissions issue.
What permissions are required to make it work ?
from discordutils.
It's to do with the original import, when importing DiscordUtils it imports the Music class which will crash if discord[voice] is not successfully downloaded.
Please try the suggested fix and let us know if it solves your problem so this issue can be closed.
from discordutils.
@anselal DiscordUtils has been updated now so try installing with pip install DiscordUtils
and let us know if your code starts working so this issue can be closed
from discordutils.
Related Issues (20)
- Player object error HOT 1
- Pagination - Commands should work when removing reactions aswell. HOT 3
- ERROR: No video formats found HOT 1
- Invite Tracker - KeyError: guild.id HOT 2
- Bot not playing any song. HOT 1
- Unnecessary heavy dependencies should not be compulsory HOT 1
- Add note that member intents required for pagination HOT 2
- [Suggestion] Allow pagination using multiple kinds of interactions HOT 1
- Skip function in DiscordUtils.Music() HOT 2
- [enhancement] Feature request HOT 1
- Can't go to docs HOT 2
- Using a local image within a paginated embed HOT 1
- skip tracks but don't remove from the queue
- Music : Bot is not connected to voice HOT 2
- Bot leaving and not playing after rejoining HOT 1
- play not working from example code HOT 1
- Command raised an exception: KeyError: 'dislike_count' HOT 22
- Comment the likes and dislikes to bypass the count data after yt disabled the dislike features HOT 2
- Suggestions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discordutils.