Skip to content

Conversation

bradenlc
Copy link

No description provided.

@bradenlc bradenlc changed the title Just to see changes Enable navigation by direct input Feb 1, 2018
@bradenlc bradenlc changed the title Enable navigation by direct input Obsolete request Feb 1, 2018
@bradenlc bradenlc changed the title Obsolete request Enable navigation via direct input Feb 1, 2018
@@ -250,6 +257,7 @@ fun search(message: Message, terms: List<String>) {
search.addReaction(jumpRight)
if (allEmbeds.size > 2)
search.addReaction(last)
search.addReaction(nums)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is indented unneccesarially.

@@ -223,6 +225,11 @@ fun updateMessageWithJump(jump: Int, message: Message, entry: Triple<Long, Int,
}
}

fun updateIndexToInput(originalMessage: Message, entry: Triple<Long, Int, List<EmbedBuilder>>){
val questionMessage = originalMessage.channel.sendMessage("What number entry would you like to go to?").get()
awaiting.add(Pair(Pair(originalMessage,questionMessage),entry))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use to instead of the pair constructor.

val (messages, entry) = awaitElement
val (uid, index, embeds) = entry
if (userInput.author.id == uid) {
val numsOnly = userInput.content.replace("[^0-9]".toRegex(), "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use \D

@bradenlc
Copy link
Author

bradenlc commented Feb 2, 2018

Untested post-changes, because I don't have my compiler readily available (am editing online). I wouldn't recommend enacting them yet

@bradenlc
Copy link
Author

bradenlc commented Feb 2, 2018

Now tested with no conflicts. Edge cases handling as they should. Haven't tested with cross-account interference yet, but I fail to see why that'd break and the rest wouldn't

@yrsegal
Copy link
Member

yrsegal commented Feb 2, 2018

Test cross-account interference, just to be safe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants