print to stderr not stdout
This commit is contained in:
parent
912b56a03b
commit
bead178487
|
@ -1,5 +1,6 @@
|
||||||
import discord
|
import discord
|
||||||
import random
|
import random
|
||||||
|
import sys
|
||||||
|
|
||||||
client = discord.Client()
|
client = discord.Client()
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ def dice(count):
|
||||||
|
|
||||||
@client.event
|
@client.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
print('logged in as {0.user}'.format(client))
|
print('logged in as {0.user}'.format(client), file=sys.stderr)
|
||||||
await client.change_presence(activity=discord.Game('!n for n dice, !0 for chance die'))
|
await client.change_presence(activity=discord.Game('!n for n dice, !0 for chance die'))
|
||||||
|
|
||||||
@client.event
|
@client.event
|
||||||
|
@ -56,7 +57,7 @@ async def on_message(message):
|
||||||
try:
|
try:
|
||||||
count=int(message.content.split()[0][1:])
|
count=int(message.content.split()[0][1:])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print('error parsing message {0}'.format(message.content))
|
print('error parsing message {0}'.format(message.content), file=sys.stderr)
|
||||||
return
|
return
|
||||||
|
|
||||||
if count > 69:
|
if count > 69:
|
||||||
|
|
Loading…
Reference in a new issue