Skip to content

Instantly share code, notes, and snippets.

View piecubed's full-sized avatar
Drinking coffee

piesquared piecubed

Drinking coffee
View GitHub Profile
import "dart:io";
import "package:flutter/material.dart";
class Message extends StatelessWidget {
final String thumbnail;
final String text;
final String timestamp;
final String username;
import "dart:io";
import "dart:math";
parse(String text) {
var parsedText;
if (text.contains(".")) {
parsedText = double.tryParse(text);
}
else {
parsedText = int.tryParse(text);
Ignoring exception in on_message
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/discord/client.py", line 270, in _run_event
await coro(*args, **kwargs)
File "/home/piesquared/coin-games/sweepstakes.py", line 31, in on_message
if await self.users.userExists(message.author.id):
File "/home/piesquared/coin-games/storage.py", line 131, in userExists
return await self.database.contains("id", str(userID))
File "/home/piesquared/coin-games/db.py", line 30, in contains
"SELECT * FROM {} WHERE {} = $1;".format(self.table_name, field), value)
filename = channel.lstrip('/').lstrip('.').lstrip('~')
while '/' in filename or '.' in filename or '~' in filename:
filename = channel.lstrip('/').lstrip('.').lstrip('~')
path = '../' + filename + '.txt'
f = open(path, 'a')
print(name, '\n', cmd, '\n', file = f)
f.close()
Exception in thread Thread-26:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "piebot.py", line 44, in handle_privmsg
return commands.handle_privmsg(irc, hostmask, args)
File "/home/piesquared/piebot/commands.py", line 52, in handle_privmsg
output = f.readline()
Exception in thread Thread-150:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "piebot.py", line 45, in handle_privmsg
return commands.handle_privmsg(irc, hostmask, args)
File "/home/piesquared/piebot/commands.py", line 43, in handle_privmsg
with open("example.txt", "a") as f: f.write(irc, hostmask[0], args, "\n")
Already up-to-date.
Exception in thread Thread-11:
Traceback (most recent call last):
File "/home/piesquared/piebot/commands.py", line 121, in handle_privmsg
reload_self()
File "/home/piesquared/piebot/commands.py", line 37, in reload_self
raise NameError('The reload function was not given to the commands script!')
NameError: The reload function was not given to the commands script!
During handling of the above exception, another exception occurred:
<< ('piesquared', '~piesquared', 'xIRC/user/piesquared') PRIVMSG ['#lurk', ':!reload']
Reloading
Exception in thread Thread-48:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "piebot.py", line 42, in handle_privmsg
return commands.handle_privmsg(irc, hostmask, args)
Exception in thread Thread-57:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "piebot.py", line 40, in handle_privmsg
return commands.handle_privmsg(irc, hostmask, args)
File "/home/piesquared/PieBot/commands.py", line 81, in handle_privmsg
piebot.reload()
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "piebot.py", line 40, in handle_privmsg
return commands.handle_privmsg(irc, hostmask, args)
File "/home/piesquared/PieBot/commands.py", line 51, in handle_privmsg
irc.me(channel, 'slaps', hostmask , 'with the sharp end of a sword to further his ouch.')
File "/home/piesquared/PieBot/miniirc.py", line 72, in me