Page MenuHomePhabricator

Implement a command to list infobot keys
Closed, ResolvedPublic

Description

Make a command like @infobot-list or similar name that would output a list of all keys for given channel. List should be only displayed in case that length of all keys (eg. resulting string) is not longer than 200 characters. In case the string is too long, display a trimmed list, or a link to webpage that contains all keys. I will leave that up to whoever wants to resolve this task. Example code that shows the link is here: https://github.com/benapetr/wikimedia-bot/blob/master/src/WMBot/Commands/Admin.cs#L368

Source code of infobot extension: https://github.com/benapetr/wikimedia-bot/tree/master/src/WMBot.Plugins/Infobot

This task requires advanced level of C#

Event Timeline

Zppix created this task.Sep 30 2017, 8:58 PM
Restricted Application added a project: User-Zppix. · View Herald TranscriptSep 30 2017, 8:58 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Petrb added a subscriber: Petrb.Oct 3 2017, 1:21 PM

what do you mean, I didn't even know that bot now has per-channel commands?

what do you mean, I didn't even know that bot now has per-channel commands?

I believe he means "!foo is bar" commands. In your docs, they're referred to as the "infobot."

Petrb added a comment.Oct 3 2017, 8:14 PM

aah infobot. Well that was already discussed, the problem is that here simply is no way for bot to output too many messages in short time. It can also be abused to spam channels. So for that reason there is a web list of all keys in a channel http://wm-bot.wmflabs.org/db/

You can display keys in channel using "@search" feature but it looks a bit bugged to me

Zppix added a comment.Oct 3 2017, 11:19 PM

@Petrb maybe search should be gaven an alias or a rename altogether cause search is a pretty vague name for that function

Petrb added a comment.Oct 4 2017, 8:03 AM

But how? It's exactly what it does, it searches the keys. How would you rename it?

Zppix added a comment.Oct 4 2017, 10:34 PM

But how? It's exactly what it does, it searches the keys. How would you rename it?

Maybe @listkeys?

Petrb added a comment.Oct 19 2017, 6:31 PM

but @search doesn't list keys, it searches for them. There is no command to list keys, but if you think it's so important I can consider adding it

Petrb triaged this task as Medium priority.Oct 19 2017, 6:31 PM
Petrb renamed this task from Provide a way to automatically list custom commands to Implement a command to list infobot keys.Oct 30 2017, 1:32 PM
Petrb updated the task description. (Show Details)
Petrb added a subscriber: Google-Code-in-2017.
Petrb updated the task description. (Show Details)Oct 30 2017, 1:36 PM
Zppix removed a subscriber: Google-Code-in-2017.

I believe @Petrb meant to add a project tag not subscribe GCI2017 to the task? Also @Petrb are you willing to mentor this?

@Petrb: Would you (and/or someone else? who?) mentor this in Google-Code-in-2017?

Petrb added a comment.Nov 29 2017, 2:41 PM

Yes, I can mentor this, but first I need to create a task for this in GCI website

Petrb closed this task as Resolved.Dec 23 2018, 10:58 PM
Petrb claimed this task.