Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

SupportDialog.cs 793 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  1. namespace MultiDialogsBot.Dialogs
  2. {
  3. using System;
  4. using System.Threading.Tasks;
  5. using Microsoft.Bot.Builder.Dialogs;
  6. using Microsoft.Bot.Connector;
  7. [Serializable]
  8. public class SupportDialog : IDialog<int>
  9. {
  10. public async Task StartAsync(IDialogContext context)
  11. {
  12. context.Wait(this.MessageReceivedAsync);
  13. }
  14. public virtual async Task MessageReceivedAsync(IDialogContext context, IAwaitable<IMessageActivity> result)
  15. {
  16. var message = await result;
  17. var ticketNumber = new Random().Next(0, 20000);
  18. await context.PostAsync($"Your message '{message.Text}' was registered. Once we resolve it; we will get back to you.");
  19. context.Done(ticketNumber);
  20. }
  21. }
  22. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...