# Do a lookup by ID, if it's found but the name doesn't match then add a row to aliases with the previous name and change the member name
member_conn=sqlite3.connect('db.sqlite3')
...
...
@@ -449,10 +481,14 @@ Games:
!gameslist <count> - Returns a list of the top 20 games and the number of people who have played that game. if you pass a limit it will show that many games instead.
!whoplayed <gamename> - Returns a list of players who have played the game.
Minigames:
!gimmecredits - Gives you some extra credits in case you run out.
!credits - Lists your current credits.
!bet <amount> - Start a game of BlackJack.
!hit - Draw a card
!stand - Show the cards
!buyticket - Purchases a raffle ticket for 100 credits
!raffle - Shows information about the current raffle
Spam:
!youtube <search term> - Returns the first video from the search results for the search term.
!gif <search term> - Returns the first gif from the search results.
...
...
@@ -606,6 +642,62 @@ Stuff:
out_string=out_string[1900:]
return
ifmessage.content.startswith('!gimmecredits'):
member=db_get_member(message.author.id)
ifnotmember:
client.send_message(message.author,"There was a problem looking up your information.")
else:
credits=db_get_credit(member['member_id'])
ifcredits<5:
amount=random.randint(5,50)
db_update_credit(member['member_id'],amount)
client.send_message(message.author,"You have been given {} credits.".format(amount,))
else:
client.send_message(message.author,"You already have credits. Stop begging.")
return
ifmessage.content.startswith('!grantcredits'):
ifmessage.author.id!='78767557628133376':
client.send_message(message.channel,"You are not Hellsbreath. Use !gimmecredits to get a few extra if you run out.")
return
members=db_get_all_members()
iflen(members)<0:
client.send_message(message.channel,"There was a problem looking up your information.")
else:
formemberinmembers:
credits=db_get_credit(member['member_id'])
ifcredits<100:
db_update_credit(member['member_id'],100)
client.send_message(message.channel,"{} has been given {} credits.".format(member['member_name'],100))
Inspired by Myst, The Witness has the player explore an open world island filled with a number of natural and man-made structures. The player progresses by solving puzzles which are based on interactions with mazes presented on panels around the island.
Raffle Date: 1/29/2016
You will be contacted if you win. To win you must purchase tickets with the !buyticket command for 100 credits.
You can get extra credits by playing !slots and !bet <amount> on BlackJack.
""")
return
ifmessage.content.startswith('!buyticket'):
member=db_get_member(message.author.id)
ifnotmember:
client.send_message(message.author,"There was a problem looking up your information.")