tgstation-server  4.3.2
The /tg/station 13 server suite
IProvider.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Threading;
4 using System.Threading.Tasks;
6 
7 namespace Tgstation.Server.Host.Components.Chat.Providers
8 {
12  interface IProvider : IDisposable
13  {
17  bool Connected { get; }
18 
22  string BotMention { get; }
23 
30  Task<Message> NextMessage(CancellationToken cancellationToken);
31 
37  Task<bool> Connect(CancellationToken cancellationToken);
38 
44  Task Disconnect(CancellationToken cancellationToken);
45 
52  Task<IReadOnlyCollection<ChannelRepresentation>> MapChannels(IEnumerable<Api.Models.ChatChannel> channels, CancellationToken cancellationToken);
53 
61  Task SendMessage(ulong channelId, string message, CancellationToken cancellationToken);
62 
68  Task SetReconnectInterval(uint reconnectInterval);
69 
82  Task<Func<string, string, Task>> SendUpdateMessage(
83  RevisionInformation revisionInformation,
84  Version byondVersion,
85  DateTimeOffset? estimatedCompletionTime,
86  string gitHubOwner,
87  string gitHubRepo,
88  ulong channelId,
89  bool localCommitPushed,
90  CancellationToken cancellationToken);
91  }
92 }
For interacting with a chat service
Definition: IProvider.cs:12