✏️ Fix typo, missing await and weird code indentation
This commit is contained in:
@@ -16,9 +16,8 @@ export {
|
||||
const LOG_PREFIX = "[ChatClient] ";
|
||||
|
||||
async function connect(channels: Array<any>) {
|
||||
const authProvider = await getAuthProvider(
|
||||
const authProvider = await getAuthProvider();
|
||||
|
||||
);
|
||||
if (
|
||||
chatClient &&
|
||||
(
|
||||
@@ -85,8 +84,8 @@ async function handleClientAction(action: any) {
|
||||
}
|
||||
|
||||
// send a chat message
|
||||
function say(channel: string, message: string) {
|
||||
chatClient.say(channel, message);
|
||||
async function say(channel: string, message: string) {
|
||||
await chatClient.say(channel, message);
|
||||
}
|
||||
|
||||
// timeouts a user in a channel
|
||||
|
@@ -27,7 +27,7 @@ async function onRedemption(message: PubSubRedemptionMessage) {
|
||||
`${LOG_PREFIX}Reward: "${message.rewardName}" (${message.rewardId}) redeemed by ${message.userDisplayName}`
|
||||
);
|
||||
// @ts-ignore
|
||||
const reward = message._data.data.redemption.rewºard;
|
||||
const reward = message._data.data.redemption.reward;
|
||||
|
||||
let msg: any = {
|
||||
id: message.id,
|
||||
|
@@ -93,7 +93,7 @@ async function onRefresh(refreshData: AccessToken): Promise<void> {
|
||||
async function getApiClient() {
|
||||
const authProvider = await getAuthProvider();
|
||||
|
||||
return new ApiClient({ authProvider });
|
||||
return await new ApiClient({ authProvider });
|
||||
}
|
||||
|
||||
async function getUsernameFromId(userId: number) {
|
||||
|
Reference in New Issue
Block a user