Modbot to Help You Run Games: Now With A Votecounter Demo!

This forum is for discussion related to the game.
Flubbernugget
Jack of All Trades
 
User avatar
Joined: June 26, 2014
Pronoun: He

Post Post #125  (ISO)  » Tue May 15, 2018 8:19 pm

The push is going to come in with my one line change to donbot.

Flubbernugget
Jack of All Trades
 
User avatar
Joined: June 26, 2014
Pronoun: He

Post Post #126  (ISO)  » Tue May 15, 2018 8:20 pm

also maybe dos2unix format issues

Flubbernugget
Jack of All Trades
 
User avatar
Joined: June 26, 2014
Pronoun: He

Post Post #127  (ISO)  » Tue May 15, 2018 8:24 pm

Push is on my fork under the branch "prodbot"

Flubbernugget
Jack of All Trades
 
User avatar
Joined: June 26, 2014
Pronoun: He

Post Post #128  (ISO)  » Tue May 15, 2018 8:30 pm

In post 123, GreenLiquid wrote:Right, sorry, I meant... is it possible to get it out of its state of not sending PMs by exiting and re-launching the application? Just to see if it's something within that session or not. Might help narrow down the cause.

I don't have much more time tonight to continue working on this, but I am willing to give this a shot at a later date.

So something like this?
Code: Select all
-> Send pm to 13 users. Fail!

-> Send pm to 13 users. Press CTRL+C. Program terminates.

-> Send pm to 13 users. Pass!

GreenLiquid
Mafia Scum
 
User avatar
Joined: July 16, 2005
Pronoun: He

Post Post #129  (ISO)  » Tue May 15, 2018 8:51 pm

Yeah, something like that. But Psyche might have an insight to allow us to avoid a trial-and-error approach altogether.
Avatar courtesy of Chickadee! | GTKAL

northsidegal
Jack of All Trades
 
User avatar
Joined: August 24, 2017
Pronoun: She

Post Post #130  (ISO)  » Wed May 16, 2018 1:24 am

It seems that trying to input a value greater than 60 for the pagetopping tool gave me a "ValueError: invalid literal for int() with base 10: '' error.

It also seems that sometimes the counter goes into negative numbers instead of resetting when hitting zero.

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: on the road to damascus
Pronoun: He

Post Post #131  (ISO)  » Wed May 16, 2018 1:49 am

hm ok
food tastes better when it's free

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #132  (ISO)  » Wed May 16, 2018 10:36 am

I think I know what this is.

1. The input field that you're storing the counter has type=text, it should be type=number
2. JavaScript has problems representing floating point numbers
3. Shit hits the fan when you're trying to multiply it by 1 in the setInterval() function

suggestion (optional): since I don't think people will be staring at the pagetopper page constantly, instead of setInterval(), use setTimeout() and use the counter as the timeout should probably be cleaner

Edit: probably should not be converting string into numbers by multiplying it with 1, use parseInt() instead

Flubbernugget
Jack of All Trades
 
User avatar
Joined: June 26, 2014
Pronoun: He

Post Post #133  (ISO)  » Wed May 16, 2018 10:52 am

Fuckin Javascript lol

On a side note, would anyone be opposed to me importing a bootstrap template for the personal Modbot ui?

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: on the road to damascus
Pronoun: He

Post Post #134  (ISO)  » Wed May 16, 2018 10:56 am

what's that
food tastes better when it's free

Flubbernugget
Jack of All Trades
 
User avatar
Joined: June 26, 2014
Pronoun: He

Post Post #135  (ISO)  » Wed May 16, 2018 10:58 am

It's a set of CSS templates to make a website look pretty in a short period of time. I think it's written by Twitter people

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #136  (ISO)  » Wed May 16, 2018 11:59 am

I have some different ideas about how to go about implementing the pagetopper. Im just gonna build the backend for it in a separate class

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: on the road to damascus
Pronoun: He

Post Post #137  (ISO)  » Wed May 16, 2018 4:01 pm

yeah totally fine
food tastes better when it's free

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: on the road to damascus
Pronoun: He

Post Post #138  (ISO)  » Wed May 16, 2018 4:01 pm

i will be distracted from this project till the weekend
food tastes better when it's free

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #139  (ISO)  » Thu May 17, 2018 1:38 pm

In post 64, Psyche wrote:me and radiantcowbells found a bug in getNumberOfPosts() that makes it fail when there are unread posts in the thread. disgusting.

im guessing this is never fixed

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: on the road to damascus
Pronoun: He

Post Post #140  (ISO)  » Thu May 17, 2018 2:56 pm

No it’s fixed
food tastes better when it's free

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #141  (ISO)  » Thu May 17, 2018 3:03 pm

ok so, I fix the bug mentioned above, because that's needed for the pagetopper to work

also finished a prototype for the pagetopper. It takes care of the scheduling part in python, so effectively eliminating the need to do it on the client side /w JavaScript.

to run it, you need to initialize it with a thread, and the current page number of the thread, then call the run() function

I'm currently testing in a game im modding so we'll see how that goes lol

pedit: are you sure?

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #142  (ISO)  » Thu May 17, 2018 3:06 pm

I'm pretty sure the current code will fail if you try to get the post number of a thread that has unread posts

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #143  (ISO)  » Thu May 17, 2018 3:12 pm

maybe you fixed it locally and forgot to push?

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: on the road to damascus
Pronoun: He

Post Post #144  (ISO)  » Thu May 17, 2018 3:15 pm

yeah probably
food tastes better when it's free

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: on the road to damascus
Pronoun: He

Post Post #145  (ISO)  » Thu May 17, 2018 3:16 pm

let's use the issues feature on github to track these problems
food tastes better when it's free

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: on the road to damascus
Pronoun: He

Post Post #146  (ISO)  » Thu May 17, 2018 3:38 pm

Ill go through every post in the thread and make sure all issues/proposals are either resolved or have an associated issue in the repo
food tastes better when it's free

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #147  (ISO)  » Thu May 17, 2018 4:49 pm

i need a thread (to spam) to test makePosts, it seems to have the same issue sendPM had before I added gevent

maybe i will make requests in makePosts async too hmmmm

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: on the road to damascus
Pronoun: He

Post Post #148  (ISO)  » Fri May 18, 2018 3:29 pm

I'm free. This weekend I will test and cleanup old code and implement a first version of the votecount pagetopper.
food tastes better when it's free

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #149  (ISO)  » Fri May 18, 2018 3:55 pm

I decided to split my changes into 3 separate PRs so it's easier to merge them individually.

one for the pagetopper prototype; one for fixing makePosts; and one for fixing getNumberOfPosts (optional if you're gonna push your fix)

PreviousNext
[ + ]

Return to Mafia Discussion