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

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

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."

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

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

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

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

Maybe @listkeys?

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.
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?

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

Petrb claimed this task.