Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. using Discord;
  2. using Discord.Commands;
  3. using Discord.API;
  4.  
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10.  
  11. namespace KazBot
  12. {
  13. class MyBot
  14. {
  15. DiscordClient discord;
  16. CommandService commands;
  17.  
  18. public MyBot()
  19. {
  20. discord = new DiscordClient(x =>
  21. {
  22. x.LogLevel = LogSeverity.Info;
  23. x.LogHandler = Log;
  24. });
  25. discord.UsingCommands(x =>
  26. {
  27. x.PrefixChar = '~';
  28. x.AllowMentionPrefix = true;
  29. });
  30.  
  31. commands = discord.GetService<CommandService>();
  32.  
  33. commands.CreateCommand("dance")
  34. .Do(async (e) =>
  35. {
  36. await e.Channel.SendFile("Dance/smooch.gif");
  37. });
  38. commands.CreateCommand("crafta")
  39. .Do(async (e) =>
  40. {
  41. await e.Channel.SendMessage("TaMereCrafta is IMMORTAL!!!");
  42. await e.Channel.SendFile("Dance/crafta.png");
  43. });
  44. commands.CreateCommand("battle")
  45. .Do(async (e) =>
  46. {
  47. await e.Channel.SendMessage("A Guide to Advanced Battle Strategy");
  48. await e.Channel.SendFile("Dance/strat.jpg");
  49. await e.Channel.SendMessage("With Kaz and Stiles");
  50. });
  51. commands.CreateCommand("rules")
  52. .Do(async (e) =>
  53. {
  54. await e.Channel.SendMessage("```css [RULES]```");
  55. await e.Channel.SendMessage("```css Be nice and kind to the other members of the pack!```");
  56. await e.Channel.SendMessage("```css No discriminatory or derogatory actions! (LGBTQ+, Race, Gender or other)```");
  57. await e.Channel.SendMessage("```css Be respectful to everyone!```");
  58. await e.Channel.SendMessage("```css Be mindful of people's triggers and anything that makes other members uncomfortable!```");
  59. await e.Channel.SendMessage("```css Do not start arguments! If someone is trying to start an argument please report it to a member of staff!```");
  60. await e.Channel.SendMessage("```css Do not post images that could be triggering, derogatory, discriminatory, degrading or otherwise offensive to others!```");
  61. await e.Channel.SendMessage("```css [PUNISHMENTS]```");
  62. await e.Channel.SendMessage("```css Breaking the rules will result in a warning, and staff can choose to mute you with the command ?mute for however long they believe is required.```");
  63. await e.Channel.SendMessage("```css Any serious infraction of the rules will result in an instant kick. This is decided by the staff.```");
  64. await e.Channel.SendMessage("```css You may receive up to 3 warnings (Strikes) before you are kicked.```");
  65. await e.Channel.SendMessage("```css If you receive 3 warnings after already being kicked before, you may be banned.```");
  66. });
  67. discord.ExecuteAndWait(async () =>
  68. {
  69. await discord.Connect(":P", TokenType.Bot);
  70. });
  71.  
  72. }
  73. private void Log(object sender, LogMessageEventArgs e)
  74. {
  75. Console.WriteLine(e.Message);
  76. }
  77.  
  78. Discord.API.em
  79. }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement