siscodeorg / sisbase

An easy to use discord bot base for D#+. Discord Link :
https://discord.gg/ycvm6xJ
MIT License
1 stars 0 forks source link

Functions from dsp.interactivity #48

Open alikindsys opened 4 years ago

alikindsys commented 4 years ago

Here's all dsp.interactivity functions. This issue was created to decide on what to port and what to discontinue support due to how different is the approach for both APIs are.

All functions will be posted as separate comments.

The format for the comments are:

<code block>
function_signature(params)
</code block>
---
Description : [Documentation from dsp if exists]
Status : [Accepted, Postponed (Added if requested in the future), Rejected, Ported]
Reason : 
alikindsys commented 4 years ago
public Task<ReadOnlyCollection<Reaction>> CollectReactionsAsync(DiscordMessage m, TimeSpan? timeout)

Description : Collects reactions on a specific message. Status : Reason :

alikindsys commented 4 years ago
public Task<ReadOnlyCollection<PollEmoji>> DoPollAsync(DiscordMessage m, DiscordEmoji[] emojis, PollBehaviour? behaviour, TimeSpan? timeout)

Description : Makes a poll and returns poll results. Status : Reason :

alikindsys commented 4 years ago
public Task<InteractivityResult<DiscordMessage>> WaitForMessageAsync(Func<DiscordMessage, bool> predicate, TimeSpan? timeout)

Description : Waits for a specific message. Status : Reason :

alikindsys commented 4 years ago
public Task<InteractivityResult<MessageReactionAddEventArgs>> WaitForReactionAsync(Func<MessageReactionAddEventArgs, bool> predicate, DiscordMessage message, DiscordUser user, TimeSpan? timeout)

Description : Waits for a specific reaction. Status : Reason :

alikindsys commented 4 years ago
public Task<InteractivityResult<MessageReactionAddEventArgs>> WaitForReactionAsync(Func<MessageReactionAddEventArgs, bool> predicate, DiscordUser user, TimeSpan? timeoutoverride)

Description : Waits for a specific reaction. Status : Reason :

alikindsys commented 4 years ago
public Task<InteractivityResult<MessageReactionAddEventArgs>> WaitForReactionAsync(Func<MessageReactionAddEventArgs, bool> predicate, TimeSpan? timeout)

Description : Waits for a specific reaction. Status : Reason :

alikindsys commented 4 years ago
public Task<InteractivityResult<TypingStartEventArgs>> WaitForTypingAsync(DiscordChannel channel, TimeSpan? timeout)

Description : Waits for any user to start typing. Status : Reason :

alikindsys commented 4 years ago
public Task<InteractivityResult<TypingStartEventArgs>> WaitForUserTypingAsync(DiscordUser user, DiscordChannel channel, TimeSpan? timeoutoverride)

Description : Waits for a user to start typing. Status : Reason :

alikindsys commented 4 years ago
public Task<InteractivityResult<TypingStartEventArgs>> WaitForUserTypingAsync(DiscordUser user, TimeSpan? timeoutoverride)

Description : Waits for a user to start typing. Status : Reason :

alikindsys commented 4 years ago
public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this DiscordChannel c, DiscordMember m, TimeSpan? timeoutoverride)

Description : Gets the next message sent in this channel by a specific user. Status : Reason :

alikindsys commented 4 years ago
public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this DiscordChannel c, Func<DiscordMessage, bool> predicate, TimeSpan? timeoutoverride)

Description : Gets the next message sent in this channel that matches the predicate. Status : Reason :

alikindsys commented 4 years ago
public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this DiscordChannel c, TimeSpan? timeoutoverride)

Description : Gets the next message sent in this channel. Status : Reason :

alikindsys commented 4 years ago
public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this DiscordMessage m, Func<DiscordMessage, bool> predicate, TimeSpan? timeoutoverride)

Description : Gets the next message with the same channel and user, matching a predicate. Status : Reason :

alikindsys commented 4 years ago
public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this DiscordMessage m, TimeSpan? timeoutoverride)

Description : Gets the next message with the same channel and user. Status : Reason :

alikindsys commented 4 years ago
public static Task<InteractivityResult<MessageReactionAddEventArgs>> WaitForReactionAsync(this DiscordMessage m, DiscordUser user, TimeSpan? timeoutoverride)

Description : Waits for a reaction on a message. Status : Reason :

alikindsys commented 4 years ago
public static Task<InteractivityResult<MessageReactionAddEventArgs>> WaitForReactionAsync(this DiscordMessage m, DiscordUser user, DiscordEmoji emoji, TimeSpan? timeoutoverride)

Description : Waits for a reaction on a message. Status : Reason :

alikindsys commented 4 years ago
public static Task WaitForUserTypingAsync(this DiscordChannel c, DiscordUser user, TimeSpan? timeoutoverride)

Description : Waits for a user to start typing Status : Reason :

alikindsys commented 4 years ago

Note : All Methods following are about Pagination, which weren't even planned to be on the Interaction API.

Consider this comment as the master comment for the Pagination feature.

If pagination as a whole is defined as Postponed or Rejected, you can safely ignore the following methods as long as the reasoning behind is stated below.

Why on earth this is under DSharpPlus.Interactivity is left as an exercise for the viewer.


Reason for [Rejection/Postponing] :

alikindsys commented 4 years ago
public static Task SendPaginatedMessageAsync(this DiscordChannel c, DiscordUser user, Page[] pages, PaginationEmojis emojis, PaginationBehaviour? behaviour , PaginationDeletion? deletion TimeSpan? timeoutoverride)

Description : Sends a paginated message Status : [Optional] Reason : [Optional]

alikindsys commented 4 years ago
public Page[] GeneratePagesInEmbed(string input, SplitType splittype = SplitType.Character, DiscordEmbedBuilder embedbase = null)

Description : Generates pages from a string, and puts them in message embeds. Status : [Optional] Reason : [Optional]

alikindsys commented 4 years ago
public Page[] GeneratePagesInContent(string input, SplitType splittype = SplitType.Character)

Description : Generates pages from a string, and puts them in message content. Status : [Optional] Reason : [Optional]

alikindsys commented 4 years ago
public Task SendPaginatedMessageAsync(DiscordChannel c, DiscordUser u, IEnumerable<Page> pages, PaginationEmojis emojis = null, PaginationBehaviour? behaviour, PaginationDeletion? deletion, TimeSpan? timeoutoverride)

Description : Sends a paginated message. Status : [Optional] Reason : [Optional]

alikindsys commented 4 years ago
public Task WaitForCustomPaginationAsync(IPaginationRequest request)

Description : Waits for a custom pagination request to finish. This does NOT handle removing emojis after finishing for you. Status : [Optional] Reason : [Optional]