Jump to content

Best way to get a bot's email from inside script?


PlumpRump

Recommended Posts

Is there any built in way to get the login name (email) of the current bot from inside a script? I did a cursory search of the forums and API and couldn't find anything.

I wrote a custom logger that writes to a new file every time a script is run. I'd like to be able to include the account email of the bot in the name of each log file so I know which account each log file is from. Also in the future, I may use the email to communicate status information about a bot to a server, and a bot's email seems like a good primary key.

Link to comment
Share on other sites

1 hour ago, PlumpRump said:

Is there any built in way to get the login name (email) of the current bot from inside a script? I did a cursory search of the forums and API and couldn't find anything.

I wrote a custom logger that writes to a new file every time a script is run. I'd like to be able to include the account email of the bot in the name of each log file so I know which account each log file is from. Also in the future, I may use the email to communicate status information about a bot to a server, and a bot's email seems like a good primary key.

getBot().getUsername();

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...