Advertisement
Digitally_Neon

Static class works from

Sep 19th, 2020
1,017
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.24 KB | None | 0 0
  1. public static async Task Maindo(SocketMessage arg)
  2.         {
  3.             if (Economy.CountProductForUser(Product.flower, arg.Author.Id) > 0)
  4.             {
  5.                 var User = arg.MentionedUsers.Count >= 1 ? arg.MentionedUsers.First() : null;
  6.                 if (User == null)
  7.                 {
  8.                     await arg.Channel.SendMessageAsync("Please mention a user to give the flower to!");
  9.                     var WFR = new WaitForResponse()
  10.                     {
  11.                         TimeLimitS = 15,
  12.                         ChannelId = arg.Channel.Id,
  13.                         UserId = arg.Author.Id
  14.                     };
  15.                     var Msg = await WFR.Start();
  16.                     User = Msg.MentionedUsers.Count > 0 ? Msg.MentionedUsers.First() : null;
  17.                 }
  18.                 await arg.Channel.SendMessageAsync($"You gave {User.Mention} a flower! <3");
  19.                 Economy.ChangeProductCountForUser(Product.flower, -1, arg.Author.Id);
  20.                 Economy.ChangeProductCountForUser(Product.flower, 1, User.Id);
  21.             }
  22.             else
  23.             {
  24.                 await arg.Channel.SendMessageAsync($"You need to buy flowers first! `{Program.Prefix}buy flower`");
  25.             }
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement