Closed skeith closed 6 years ago
Added PIL library rendering for @skeith
Awww thank you. Forgot I even have this issue opened. Anyway, the image not have to be that one I sent
This probably a small enhancement. Make adding quote confirmation show its quote number.
Example given : Quote #15 added!
This probably a small enhancement. Make adding quote confirmation show its quote number.
That'll only be valid for when quotes can't shift around in their list. Right now, deleting a lower-numbered quote will shift the ones above it down, making the number shown in your example meaningless.
I see.
The reason I want suggest this is to know the number of stored quote without listing them, but yeah, I never thought about deletion
Better error handling when there is no quote found. Currently prints Error in command 'quote'. Check your console or logs for details.
I haven't forgotten about this. Serverquotes just isn't very popular.
You can get global quotes on either tmerc or tekulvw's cogs.
That said, I'd like to make the cog able to work in both a local or global context, by assigning a global quote number in addition to the server number it does now. A simple mapping would eliminate the need to duplicate data.
The version in the develop branch now has a lot of improvements, plus text search. It also checks for manage_messages or administrator permissions on top of the normal role checks.
I don't know if PIL is worth adding when embeds + markdown exists, and I'm still thinking of how I want to go about global/cross-server quoting. The database keeps track of both server quote ID and a global ID, but none of the global things are exposed yet. I mainly want to make sure that members can't see quotes from servers they aren't in; perhaps with the option of making owner-added "global" quotes accessible despite that. Thoughts?
Embed works too. PIL suggestion is there just as an eye candy. It sure will looks good from end user view, but I understand the hell of coding it.
Global quotes should be readable by anyone, without any context of what server they came from. Server quotes should only be readable by that server only and I think there should be another command that is able to change any server quotes becomes global one.
for storage, I can only see having two separate database. one for global, one for server
And oh no, why do I have close and comment button?
I almost clicked that
The database in the current design stores them in a single table, but the query commands are restricted by server ID. It would be straightforward to add a column for a global flag, but who gets to decide what quotes are global? If anyone with quote add permissions can also make a quote public, I'd definitely have to also add a NSFW flag.
You have the button because you opened the issue.
ah right, silly me.
I'd say, only bot owner or server owner can make a quote global. That being said, I guess the docstring for global flag should warn the user about the meaning of a quote being global.
For global deletion, lock it to bot owner
Fair enough. Since the cog is up to date and stable, I'll work on some other stuff before adding the global quote feature.
If you're happy with the embeds, permissions, and search miss handling, would you mind ticking those off? PIL probably isn't gonna happen in V2.
as for permission, I think v3 permission can allow addquote to be used by another role
for v2, permbreaker cog exist but if you do plan to add your own permission for addquote, that'll be nice
@skeith the latest version in the develop branch has global quotes implemented. There's no toggle to mark ALL quotes as global, and I don't think I want to expose that. But there is a workaround. Calling:
cog._update_quotes(enforce_key=False, is_global=True)
will mark all quotes as global.
Of course, if you just want add a global quote that's independent of any server, you can use [p]gquote add
, add-msg
or add-nm
, even from in a server. Only the owner can call those.
I will try to test it as soon as I have free time
addquote
or (better solution) add new command to allow roles to doaddquote
Toggle to make ALL quotes GLOBAL (mostly for selfbot)will not expose via commandquote publish <quote_num>
Toggle for EMBED output (This makes a quote special)embeds are on for all quotes nowPIL quote rendering