-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a2f70f
commit 4096118
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
src/Disqord.Core/Entities/Local/Guild/Extensions/LocalChannelTagExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.ComponentModel; | ||
|
||
namespace Disqord; | ||
|
||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public static class LocalChannelTagExtensions | ||
{ | ||
public static TChannelTag WithId<TChannelTag>(this TChannelTag channelTag, Snowflake id) | ||
where TChannelTag : LocalChannelTag | ||
{ | ||
channelTag.Id = id; | ||
return channelTag; | ||
} | ||
|
||
public static TChannelTag WithName<TChannelTag>(this TChannelTag channelTag, string name) | ||
where TChannelTag : LocalChannelTag | ||
{ | ||
channelTag.Name = name; | ||
return channelTag; | ||
} | ||
|
||
public static TChannelTag WithIsModerated<TChannelTag>(this TChannelTag channelTag, bool isModerated = true) | ||
where TChannelTag : LocalChannelTag | ||
{ | ||
channelTag.IsModerated = isModerated; | ||
return channelTag; | ||
} | ||
|
||
public static TChannelTag WithEmoji<TChannelTag>(this TChannelTag channelTag, LocalEmoji emoji) | ||
where TChannelTag : LocalChannelTag | ||
{ | ||
channelTag.Emoji = emoji; | ||
return channelTag; | ||
} | ||
} |
File renamed without changes.