pocketzworld / highrise-net-sdk Goto Github PK
View Code? Open in Web Editor NEW.net SDK for Highrise API
.net SDK for Highrise API
<6eea363ea1662fa8cc7fa31712e0efc6336209469820c4cf0ebc7cc110fd0721>;
from highrise import (
BaseBot,
ChatEvent,
Highrise,
main,
UserJoinedEvent,
UserLeftEvent,
)
from highrise.models import (
AnchorPosition,
ChannelEvent,
ChannelRequest,
ChatEvent,
ChatRequest,
CurrencyItem,
EmoteEvent,
EmoteRequest,
Error,
FloorHitRequest,
GetRoomUsersRequest,
GetWalletRequest,
IndicatorRequest,
Item,
Position,
Reaction,
ReactionEvent,
ReactionRequest,
SessionMetadata,
TeleportRequest,
TipReactionEvent,
User,
UserJoinedEvent,
UserLeftEvent,
)
from asyncio import run as arun
import random
from webserver import keep_alive
class Bot(BaseBot):
async def on_start(self, SessionMetadata: SessionMetadata) -> None:
await self.highrise.walk_to(Position(0.5, 0, 5))
await self.highrise.chat("Hey I'm Back! Sorry For Inconvenience")
async def on_user_join(self, user: User) -> None:
print(f"@{user.username} Joined the room")
await self.highrise.chat(
f"\nWelcome @{user.username}! Blessed to have you here!\n")
async def on_tip(self, sender: User, receiver: User,
tip: CurrencyItem | Item) -> None:
print(
f"{sender.username} tipped {receiver.username} an amount of {tip.amount}"
)
goldAmount = tip.amount
emoteId = 'idle-dance-casual'
if goldAmount >= 5 and receiver.username == "iSeaweed":
await self.highrise.chat(
f"\nThank You {sender.username}!\nI'm so glad you tipped {tip.amount} to the host, keep showing love 💙"
)
await self.highrise.send_emote(emoteId, sender.id)
else:
await self.highrise.chat(
f"@{sender.username} tipped {tip.amount}G to the lovely @{receiver.username}"
)
async def run(self, room_id, token):
await main.main(self, room_id, token)
keep_alive()
if name == "main":
room_id = "643d51b421ff12265b10dd25"
token = "30de493fb31567ebe529a9fb4a4b9569901222de25cda4ed887be3a64c048d85"
arun(Bot().run(room_id, token))
سلام خوش اومدی
چقدر تو نازی
Ddd
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.