* Implement Quote Formatting
Adds support for block quote text formatting. This feature is currently only implemented in the Canary client.
This formatting adds a "> " to each new line from the input text.
* add > char to character sanitization
* change assumptions around whitespace strings
* add blockquote (>>>) formatting + test
* Implement Client Status Support
Adds support for using the client_status as sent as part of the Presence model. This value can be used to determine if a user is active on the native desktop app, the mobile app, or the website.
* lint: whitespace in IPresence
* Remove breaking change to IPresence interface with a note for 2.1
* update comment to not reference 2.1
* re-add interface break to IPresence
* add example payload for client_status
* use inline declaration for Enum.TryParse
* add new MessageTypes
* Add new properties to the updated models
* add the SystemChannelMessageDeny
unsure if there would be a better name for this enum, given it's inverted nature, open for suggestions
* add PremiumTier flag, add Guild description property
* add method for getting vanity image from CDN
* make the size of GetGuildVanityUrl optional
* lint: remove commented out code from prev commit
* add a None flag to SystemChannelMessage enum
* implement the new modify guild params
* implement additional model properties in IGuild types
* implement GuildMember PremiumSince
* docs: reword size param explanation
* add extension methods that make it easier to check the SystemChannelMessage flags for end users
because the flag is inverted, this ideally should make it easier for the user. it may also be useful to do something similar for modifying this property
* docs: correct typo from copy-paste
* add the premium_subscription_count property
* fix vanity url code and banner switchup
a mistake was made somewhere, that's all I know for sure
* clarify remark on inverted logic for system channel flags
* fix PremiumSubscriptionCount optional value
* add another example to the systemchannelflags xmldoc remark
* docs: fix typos, clarify wording
* use DateTimeOffset for PremiumSince, follow conventions from other prop
* Squashed commit of test rewrite changes
fix missing priority speaker flag
rewrite the TestChannelPermissionModify test
add test for GuildPermission modify
separate unit and integration tests, start writing channel and guild permission tests
copy over the color tests
copy over the emote tests
copy the token utils tests
make the mocked entities sealed classes
copy the TypeReaderTests class
properly dispose the CommandService in the TypeReaderTests
start writing tests for EmbedBuilder and related classes
test that properties throw ArgumentException when invalid
add tests for the embed length property
add withFooter tests
finish adding tests to EmbedBuilder
fix bug in value validation of EmbedFieldBuilder
hey, these tests actually found a bug!
add tests for the MentionUtils class
add tests for the Format util class
remove all of the old tests
add analyzer tests (copied from old tests)
add tests for the SnowflakeUtils class
add integration tests
these get around the issue of state persisting between tests by creating and deleting a guild for each set of tests. these shouldn't be run excessively because of the rate limits, but should be fine every now and then
remove unnecessary launchSettings.json
update outdated string
don't create a new guild each time, as that can result in errors
this can happen if a bot creates too many guilds without properly deleting them
add some tests that show that guild can be modified
await async assert
add more measures that created channels are deleted when done
remove "Test" prefix from test method names
I think that this prefix when already displayed under a class with a suffix of "Tests" is redundant
Remove mention of old test project
fix an issue from forgetting to await Assert.ThrowsAsync
explicitly disable parallelization on integration tests
add test for GuildPermission modify
separate unit and integration tests, start writing channel and guild permission tests
copy over the color tests
copy over the emote tests
make the mocked entities sealed classes
properly dispose the CommandService in the TypeReaderTests
fix bug in value validation of EmbedFieldBuilder
hey, these tests actually found a bug!
add tests for the MentionUtils class
add tests for the Format util class
remove all of the old tests
add analyzer tests (copied from old tests)
add tests for the SnowflakeUtils class
add integration tests
these get around the issue of state persisting between tests by creating and deleting a guild for each set of tests. these shouldn't be run excessively because of the rate limits, but should be fine every now and then
remove unnecessary launchSettings.json
update outdated string
don't create a new guild each time, as that can result in errors
this can happen if a bot creates too many guilds without properly deleting them
add more measures that created channels are deleted when done
remove "Test" prefix from test method names
I think that this prefix when already displayed under a class with a suffix of "Tests" is redundant
Remove mention of old test project
fix an issue from forgetting to await Assert.ThrowsAsync
explicitly disable parallelization on integration tests
update the azure CI build script
separate execution of test projects so that if one fails the other will not pass
one of the unit tests failed, but the analzyer tests passed
fix test that would break in different timezones
enable the integration tests (only on dev branch)
* Squashed commit of test rewrite changes
fix missing priority speaker flag
rewrite the TestChannelPermissionModify test
add test for GuildPermission modify
separate unit and integration tests, start writing channel and guild permission tests
copy over the color tests
copy over the emote tests
copy the token utils tests
make the mocked entities sealed classes
copy the TypeReaderTests class
properly dispose the CommandService in the TypeReaderTests
start writing tests for EmbedBuilder and related classes
test that properties throw ArgumentException when invalid
add tests for the embed length property
add withFooter tests
finish adding tests to EmbedBuilder
fix bug in value validation of EmbedFieldBuilder
hey, these tests actually found a bug!
add tests for the MentionUtils class
add tests for the Format util class
remove all of the old tests
add analyzer tests (copied from old tests)
add tests for the SnowflakeUtils class
add integration tests
these get around the issue of state persisting between tests by creating and deleting a guild for each set of tests. these shouldn't be run excessively because of the rate limits, but should be fine every now and then
remove unnecessary launchSettings.json
update outdated string
don't create a new guild each time, as that can result in errors
this can happen if a bot creates too many guilds without properly deleting them
add some tests that show that guild can be modified
await async assert
add more measures that created channels are deleted when done
remove "Test" prefix from test method names
I think that this prefix when already displayed under a class with a suffix of "Tests" is redundant
Remove mention of old test project
fix an issue from forgetting to await Assert.ThrowsAsync
explicitly disable parallelization on integration tests
add test for GuildPermission modify
separate unit and integration tests, start writing channel and guild permission tests
copy over the color tests
copy over the emote tests
make the mocked entities sealed classes
properly dispose the CommandService in the TypeReaderTests
fix bug in value validation of EmbedFieldBuilder
hey, these tests actually found a bug!
add tests for the MentionUtils class
add tests for the Format util class
remove all of the old tests
add analyzer tests (copied from old tests)
add tests for the SnowflakeUtils class
add integration tests
these get around the issue of state persisting between tests by creating and deleting a guild for each set of tests. these shouldn't be run excessively because of the rate limits, but should be fine every now and then
remove unnecessary launchSettings.json
update outdated string
don't create a new guild each time, as that can result in errors
this can happen if a bot creates too many guilds without properly deleting them
add more measures that created channels are deleted when done
remove "Test" prefix from test method names
I think that this prefix when already displayed under a class with a suffix of "Tests" is redundant
Remove mention of old test project
fix an issue from forgetting to await Assert.ThrowsAsync
explicitly disable parallelization on integration tests
update the azure CI build script
separate execution of test projects so that if one fails the other will not pass
one of the unit tests failed, but the analzyer tests passed
fix test that would break in different timezones
enable the integration tests (only on dev branch)
* Update mocked channels for changed SendFileAsync signature
* comment out the integration tests from the build script
no bot token is provided to this script, and use of integration tests in CI is questionable here
* force rebuild because Azure linux build broke
* WIP commit, update IActivity and IUser with missing types
* incomplete implementation of interfaces
* Add implementation of activity flags, and extension method to check flag
* remove usings that were not required
* clean up files and add documentation where missing
* remove unused usings
* Add remark saying that premium_type info may be inaccessible to bots
it seems that this information can not be accessed by any user,
and may require the identity oauth scope
* Add locale property to the user model
adds the locale property to the user model, which appears not to be
specified for bots
* rename ActivityFlags
* Add incomplete xmldoc to ActivityFlag
Added xmldoc to the ActivityFlag type, excluded flags that i was unsure about
* rename the UserFlags file
* Add incomplete xmldoc to UserFlag enum
* Remove unnecessary extension methods and use built-in functionality
* use <c> tag for xmldoc 'null's
* Add xmldoc for JoinRequest ActivityFlag
* improve the PremiumType xmldoc
* Add zero activityflag
* Add summary tag verbs, example of IUser locale
* Rename Flag enum types to use Properties suffix
* Expose the details field in the Game model
* update Activity extension methods to support Details field
* Use inherited Details implementation in RichGame
* lint: remove commented out code from debugging
* Fix issue in previous commit
* Move oauth-only user fields to SelfUser classes
Moves the implementation of the Flags, PremiumType, and Locale user fields to ISelfUser classes. In testing, it seemed that normal bot accounts did not have this information supplied to them. When tested with a Bearer token in the Rest client, these fields are set.
* remove old HypeSquadEvents flag that appears to have been replaced with the new HypeSquad flags
* Feature: Disconnect users from voice channels
Updates GuildUserProperties to allow for setting either Channel or ChannelId to null, which will disconnect users from voice channels.
The type of ChannelId has been updated from a ulong to ulong?, which matches the latest api documentation.
* docs: update xmldoc wording
* breaking workaround, revert ChannelId to ulong
This is a workaround to prevent this PR from being a breaking
change. Reverts the type of GuildUserProperties#ChannelId to a
ulong from a ulong?. Guild Users may no longer be kicked by
setting this property to null, but setting
GuildUserProperties#Channel should still work.
* Set the @everyone IRole for @everyone and @here tags
Adds support for setting the IRole corresponding to @everyone or @here in a the tags of a message. Previously this would only set the TagType, but leave the value as null.
This does not distinguish between @everyone and @here, as that's done using TagType. The values of both will be the same.
This issue was suggested by @TheCasino
* use the EveryoneRole property
oops
* use null conditional operator instead of a null check
The DiscordSocketClient and DiscordSocketRestClient share the same
backing API client, so the Log events on both clients will be raised
from the same API calls. Proxying log events from the
DiscordSocketRestClient then means that the Log event the user hooks
into will be raised twice for a single log message.
Thanks to @TheCasino for noticing this.
Resolves#1238.
I'm not sure where this bug came from, a git blame revealed no change to
the timed event handler code since it was initiall written two years
ago.
I've found that when the event handler times out, the handler task will
be manually completed (as opposed to within Task.WhenAny), which then
bubbles the exception and allows the error to be logged.
Ensuring that the handler is completed individually, regardless of
whether or not the timeout task completed, seems to fix this problem.