private void _pubSubClient_OnMessageDeleted(object sender, OnMessageDeletedArgs e)
        {
            var pubEvent = new TwitchPublishEvent(PublishEventType.MessageDeleted)
            {
                Message  = e.Message,
                Username = e.TargetUser
            };

            OnPublishEvent?.Invoke(pubEvent);
        }
Beispiel #2
0
        private async void OnMessageDeleted(object sender, OnMessageDeletedArgs e)
        {
            Utils.LogToConsole($"User {e.TargetUser} ({e.TargetUserId}) had message deleted by {e.DeletedBy} " +
                               $"({e.DeletedByUserId}): {e.Message}");

            await SendActionAsync(new ActionTaken
            {
                ModUsername  = e.DeletedBy,
                UserUsername = e.TargetUser,
                Action       = "messagedeleted",
                Duration     = 0,
                Reason       = "(none)"
            });
        }
Beispiel #3
0
        private void PubSubService_OnMessageDeleted(object sender, OnMessageDeletedArgs e)
        {
            if (!UserIdChannelName.TryGetValue(e.ChannelId, out var channelName))
            {
                return;
            }

            OnMessageDeleted?.Invoke(this, new MessageDeletedEvent
            {
                TwitchMessageId = e.MessageId,
                Channel         = channelName,
                DeletedBy       = e.DeletedBy,
                Message         = e.Message,
                Username        = e.TargetUser,
            });
        }
 /// <summary>
 /// Passes <see cref="OnMessageDeleted"/> events down to subscribed plugins.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">An <see cref="OnMessageDeletedArgs"/> object.</param>
 private void TwitchPubSub_OnMessageDeleted(object sender, OnMessageDeletedArgs e) => OnMessageDeleted?.Invoke(this, e);
 private void PubSub_OnMessageDeleted(object sender, OnMessageDeletedArgs e)
 {
     _logger.Information($"{e.DeletedBy} deleted the message \"{e.Message}\" from {e.TargetUser}");
 }