Kaynağa Gözat

!praise

tags/v0.1^2
Ben Kurtovic 13 yıl önce
ebeveyn
işleme
e06b61393c
1 değiştirilmiş dosya ile 31 ekleme ve 0 silme
  1. +31
    -0
      bot/commands/praise.py

+ 31
- 0
bot/commands/praise.py Dosyayı Görüntüle

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-

import random

from classes import BaseCommand

class Command(BaseCommand):
"""Praise people!"""
name = "praise"

def check(self, data):
commands = ["praise", "earwig", "leonard", "leonard^bloom", "groove",
"groovedog"]
return data.is_command and data.command in commands

def process(self, data):
if data.command == "earwig":
msg = "\x02Earwig\x0F is the bestest Python programmer ever!"
elif data.command in ["leonard", "leonard^bloom"]:
msg = "\x02Leonard^Bloom\x0F is the biggest slacker ever!"
elif data.command in ["groove", "groovedog"]:
msg = "\x02GrooveDog\x0F is the bestest heh evar!"
else:
if not data.args:
msg = "You use this command to praise certain people. Who they are is a secret."
else:
msg = "You're doing it wrong."
self.connection.reply(data, msg)
return

self.connection.say(data.chan, msg)

Yükleniyor…
İptal
Kaydet