Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScratchHost account #256

Open
Zocker-Welt opened this issue Oct 25, 2024 · 46 comments
Open

ScratchHost account #256

Zocker-Welt opened this issue Oct 25, 2024 · 46 comments
Labels
hosting questions related to hosting scratchattach code

Comments

@Zocker-Welt
Copy link

how to verify a scratch host account

@TimMcCool
Copy link
Owner

You get a verification email (at least that's how it's supposed to work). I'll forward this issue to the owner of Scratch Host

@TimMcCool TimMcCool added question Further information is requested hosting questions related to hosting scratchattach code and removed question Further information is requested labels Oct 25, 2024
@zacharyli2013
Copy link

The verification also doesn't work for me
Screenshot 2024-10-29 184349

@SpyC0der77
Copy link

you went to panel.justabock.online instead of panel.justablock.online

@SpyC0der77
Copy link

also, if scratchhost doesnt work, there is panel.sillydev.co.uk

@webbrowser11
Copy link

weird because that's where the EMAIL sends you!

@vgthecoder
Copy link

I don't even get the email.

@webbrowser11
Copy link

weird... did you use the right one?

@vgthecoder
Copy link

Yeah. I did.

@vgthecoder
Copy link

And no matter how hard I try, I cannot get it to "resend".

@webbrowser11
Copy link

you MUST have used the wrong email!

@vgthecoder
Copy link

I swear I didn't. I copied and pasted it. And triple checked.

@webbrowser11
Copy link

sometimes copy and pasting creates blank characters try again.

@vgthecoder
Copy link

I can assure you I typed it in correctly.

@webbrowser11
Copy link

okay

@webbrowser11
Copy link

btw what is the right way to do this: comments = session.get_comments(user, limit=2)

@webbrowser11
Copy link

dude

@webbrowser11
Copy link

i need an answer SOON

@webbrowser11
Copy link

@vgthecoder

@webbrowser11
Copy link

i mean, this does not work at all!

import scratchattach as sa
from datetime import datetime

session = sa.login("sped_ai", "password")

project = session.connect_project("1090940082")

keyword = "/comment"

today = datetime.today().date()

def check_and_reply():
    comments = project.comments()

    today_comments = [
        comment for comment in comments 
        if datetime.fromtimestamp(comment['timestamp']).date() == today
    ]


    for comment in today_comments:
        if keyword in comment["content"]:
            comment_id = comment["id"]
            content = comment["content"]

            modified_content = comment.replace(keyword, " ",)

            project.reply_comment(comment_id, modified_content)
            print("replied.")

check_and_reply()

@TimMcCool
Copy link
Owner

btw what is the right way to do this: comments = session.get_comments(user, limit=2)

the right way is

user = session.connect_user("username")
comments = user.comments(limit=2)

how is your code not working? do you get any errors?

@TheCommCraft
Copy link
Collaborator

TheCommCraft commented Nov 4, 2024 via email

@vgthecoder
Copy link

To get it to resend the email, I just change the email. Am I doing that right? Or is there a hidden button somewhere in the UI?

@TimMcCool
Copy link
Owner

i mean, this does not work at all!


def check_and_reply():

    comments = project.comments()

btw, the comments returned by this are sa.Comment objects in v2.0 and not dictionaries. This means you gotta use comment.content, comment.timestamp etc. to access this info

@TheCommCraft
Copy link
Collaborator

TheCommCraft commented Nov 4, 2024 via email

@vgthecoder
Copy link

Yeah. I still didn't receive an email.

@TheCommCraft
Copy link
Collaborator

TheCommCraft commented Nov 4, 2024 via email

@webbrowser11
Copy link

@TimMcCool im finding another way to do it using a listener.

@webbrowser11
Copy link

webbrowser11 commented Nov 5, 2024

def SearchForNewComments():
    @events.event #Called when the event listener is ready
    def on_ready():
       print("Event listener ready!")
    @events.event
    def on_message(message):
        print(message.project, "performed action", self.type)
        comments.append(message.content)
    events.start()

@webbrowser11
Copy link

idk if this is correct if you need the rest of the code i can give it to you

@webbrowser11
Copy link

comments is a list comments.append

@webbrowser11
Copy link

@TimMcCool
Copy link
Owner

you didn't define events anythere

you need to add something like

events = session.connect_message_events()

to your code

@TheCommCraft
Copy link
Collaborator

TheCommCraft commented Nov 5, 2024 via email

@webbrowser11
Copy link

@TimMcCool should i connect it to a project?
events = session.connect_message_events()

@vgthecoder
Copy link

@TheCommCraft I have.

@TheCommCraft
Copy link
Collaborator

TheCommCraft commented Nov 6, 2024 via email

@vgthecoder
Copy link

@TheCommCraft I will loose my 2.5k of server hardware, but I'll try it.

@TheCommCraft
Copy link
Collaborator

TheCommCraft commented Nov 6, 2024 via email

@vgthecoder
Copy link

Okay. Still no email though.

@TheCommCraft
Copy link
Collaborator

TheCommCraft commented Nov 6, 2024 via email

@TheCommCraft
Copy link
Collaborator

TheCommCraft commented Nov 6, 2024 via email

@vgthecoder
Copy link

@TheCommCraft @.*** is not a valid email. Username is vg_coder.

@TheCommCraft
Copy link
Collaborator

the mail address is ```
[email protected]

@TheCommCraft
Copy link
Collaborator

I need the old username and the new one

@vgthecoder
Copy link

Well I can assure you my email works fine. I sent a message yesterday and can receive messages from other services.

@TheCommCraft
Copy link
Collaborator

TheCommCraft commented Nov 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hosting questions related to hosting scratchattach code
Projects
None yet
Development

No branches or pull requests

7 participants